Skip to content

Instantly share code, notes, and snippets.

View kcc0's full-sized avatar

Chirag K C kcc0

  • India
View GitHub Profile
@kcc0
kcc0 / gist:27d6b1482fa0b6b6c8f6
Created October 2, 2014 10:43
ActiveAdmin manual setup post installation
Some setup you must do manually if you haven't yet:
1. Ensure you have defined default url options in your environments files. Here
is an example of default_url_options appropriate for a development environment
in config/environments/development.rb:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
In production, :host should be set to the actual host of your application.
@kcc0
kcc0 / git_pull
Created September 22, 2015 06:55
Git - Pull all branches from origin
for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
Install Node
nvm install <node_version> // Install a specific Node version
nvm install node // Install latest Node release (Current)
nvm install --lts // Install latest LTS release of NodeJS
nvm install-latest-npm // Install latest NPM release only
List Available Node Releases
nvm ls-remote
nvm ls-remote | grep -i "latest"
nvm ls-remote | grep -i "<node_version>"
@kcc0
kcc0 / git-ssh-error-fix.sh
Created October 16, 2021 06:23 — forked from Tamal/git-ssh-error-fix.sh
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work