Skip to content

Instantly share code, notes, and snippets.

View sionc's full-sized avatar

Sion Chaudhuri sionc

View GitHub Profile
@sionc
sionc / git-branching-workflow
Created May 17, 2013 07:31
Branching workflow for git
git branch -a
→ Displays all branches (including remote branches)
git checkout -b [local-branch] origin/[remote-branch]
→ Create a new local-branch (e.g. test-remote) based on remote branch (e.g develop)
git fetch
→ Fetch code from remote
git merge origin/[remote-branch]
@sionc
sionc / guacamole-fork-on-github
Created May 17, 2013 07:35
This gist walks through the steps of creating a Guacamole repository fork on Github. The Guacamole project is currently hosted on Github. For development purposes, we had created a fork on Github and document the steps.
The guacamole source files can be found on sourceforge. To create a fork on github, follow these steps:
Clone the git repository
$ git clone git://guacamole.git.sourceforge.net/gitroot/guacamole/libguac-client-vnc
Navigate to the directory
$ cd libguac-client-vnc
Create a new repository on github. After creating the repository, go to the Settings > collaborators
and add yourself (and other contributors) to the collaborators list.
@sionc
sionc / fontawesome-installation
Created May 17, 2013 08:04
Installing FontAwesome
Move the font files into assets > font
Move the CSS files into assets > stylesheets
Edit stylesheet references to font files -> Delete .../font/ from all urls in font-awesome stylesheets
Add the following line to config > application.rb
# Add app/assets/fonts to the asset path
config.assets.paths << Rails.root.join("app", "assets", "fonts")
Add the following line to bootstrap_overrides.css
@sionc
sionc / guacamole-deploy-webapp
Last active December 17, 2015 10:49
Instructions to deploy Guacamole web app
Navigate to Guacamole web app directory
$ cd guacamole
Build using maven
$ mvn package
Deploying the application
---------------------------
Copy the guacamole app into the tomcat webapps folder
$ sudo cp target/guacamole-0.7.1.war /var/lib/tomcat6/webapps/guacamole.war
@sionc
sionc / heroku-commands
Created May 17, 2013 07:58
Basic heroku commands
Adding an existing database
$ git remote add heroku git@heroku.com:repository.git
Deploying to heroku
$ git push heroku local-branch:master
Resetting the database
$ heroku run rake db:drop
$ heroku run rake db:create
$ heroku run rake db:migrate
@sionc
sionc / postgresql-commands
Last active December 17, 2015 10:49
Basic postgresql commands
Creating an rails app with Postgres
$ rails new app --database=postgresql
Creating a user
$ createuser rails_dev
Creating a database
$ createdb -Orails_dev -Eunicode sager_app_development
@sionc
sionc / rails4_install
Created June 1, 2013 19:10
Instructions to install rails 4.0 and ruby 2.0 to create a new web app
# Install openssl to avoid getting an openssl error while creating a new app
# Check out http://goo.gl/HapK4 for more details
$ rvm pkg install openssl
$ rvm pkg install iconv
# Install ruby 2.0 using rvm
$ rvm install ruby-2.0.0-p195 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr
# Set ruby 2.0 as default
$ rvm use ruby-2.0.0-p195 --default
@sionc
sionc / guacamole-installing-dependencies
Last active March 6, 2017 05:08
Installing dependencies for Guacamole
Installing dependencies
----------------------------
The following steps need to be performed only once in order to install dependencies:
Cairo is a 2D graphics library with support for multiple output devices.
$ sudo apt-get install libcairo2-dev
libtool
$ sudo apt-get install libtool
automake
@sionc
sionc / rails-postgres-backbone-bootstrap-bootswatch
Last active April 6, 2020 17:35
Instructions on creating a new app using Ruby on Rails, Postgresql, Backbone.js, Twitter Boostrap, Bootstwatch
- Check rails version
$ rails -v
- To update rails
$ gem update rails
- Creating a new rails app using postgresql
$ mkdir rails_projects
$ cd rails_projects
$ rails new myapp --database=postgresql
@sionc
sionc / aws-crucible
Last active October 20, 2020 20:35
Deploying a crucible (code review tool) instance on AWS
Instructions
-------------------
- Go to Amazon Web Services (http://aws.amazon.com/) and create an account
- Launch the AWS management console (https://console.aws.amazon.com/console/home?#)
- Select EC2
- Make sure to select N. California as your region setting (top right corner)
- Create a new EC2 instance
- Select Amazon Linux as the operating system
- Use defaults for everything else
- Create a private key (e.g. "crucible")