Using git with ssh-agent on Windows

posh-git and git for windows 2.7 should include everything you need to setup an ssh-agent. Once you have the module installed you can start the agent using something like: Import-Module ~\Documents\WindowsPowerShell\Modules\posh-git\posh-git Set-Alias ssh-agent “$env:ProgramFiles\git\usr\bin\ssh-agent.exe” Set-Alias ssh-add “$env:ProgramFiles\git\usr\bin\ssh-add.exe” Start-SshAgent -Quiet You then should see the SSH_AUTH_SOCK environmental variable is set: C:\Code\Go\src\bosun.org\cmd\scollector [master]> gci env:SSH_AUTH_SOCK Name Value … Read more

Atom – disable single key binding

Open settings with File > Settings Click Keybindings Filter the list by typing ctrl-alt-= in the search box. Click the clipboard icon next to the shortcut. This will copy the shortcut definition to your clipboard. Click the hyperlinked text your keymap file. Paste in the contents of the clipboard. Replace ‘pane:increase-size’ with the value ‘unset!’ … Read more

How to config ESLint for React on Atom Editor

To get Eslint working nicely with React.js: Install linter & linter-eslint plugins Run npm install eslint-plugin-react Add “plugins”: [“react”] to your .eslintrc config file Add “ecmaFeatures”: {“jsx”: true} to your .eslintrc config file Here is an example of a .eslintrc config file: { “env”: { “browser”: true, “node”: true }, “globals”: { “React”: true }, … Read more

How do I replace a newline in Atom?

Looks like Atom matches newlines as \r\n but behaves inconsistently when replacing just the \n with nothing. So newlines seem to match \s+ and \r\n, and only “half” of the line-ending matches \n. If you replace \n with a string, nothing happens to the line-ending, but the string is appended to the next line If … Read more

Using “npm run build” fails with “npm ERR! missing script: build”

First check you have .babelrc file in your root folder. if you already have Add this in your package.json file “scripts”: { “dev”: “webpack –config=Scripts/config/webpack.dev.js –watch”, “build”: “webpack –config=Scripts/config/webpack.prod.js”, “test”: “echo \”Error: no test specified\” && exit 1″ },

How to save Atom editor config and list of packages installed

Use Git to version control your config file (~/.atom/config.cson), and any other config files (dotfiles) you may have. You can then host your Git repository for free on somewhere like GitHub, and retrieve it on other computers simply by running git clone https://github.com/{username}/{repo}. You can then keep it up to date using git push (to … Read more