Skip to content

Instantly share code, notes, and snippets.

@johnnyjung
johnnyjung / do_setup
Created April 30, 2014 22:57
Digital Ocean Talk - USCLUG 5/1/14
1. Log onto Digital Ocean
2. Add promo code _____
3. Enter billing info
4. Create ssh key. Follow directions on this page. Upload key
-> this step is optional, but highly recommended
5. Create droplet w/ MEAN Stack droplet
-> you can normally choose what you want
-> I would use ubuntu 14.04 x32
6. Log onto it (using ssh key or p/w that was emailed to)
7. adduser user
@johnnyjung
johnnyjung / git_cheat_sheet
Created January 21, 2013 20:57
Git Commands Cheat Sheet
Workflow
1) Create private branch off public (remote) branch
2) Regularly commit to this private branch
3) Clean up its history (squash merge, rebase, or merge into a separate temp branch and then merge to master)
4) Merge to origin public (remote) branch
git init (Create a new local repo)
git remote add repo_name ~~~~~~.git (Add a remote repo as a new remote "repo_name")
git clone ~~~~~.git repo_name (Clone a remote repo as "repo_name")
@johnnyjung
johnnyjung / gist:3734620
Created September 16, 2012 22:19
Live CD: Getting Access
sudo parted -l
sudo mount /dev/sda# /mnt
cd mnt/etc
sudo visudo -f sudoers
umount /mnt
@johnnyjung
johnnyjung / git_svn_cheat_sheet
Created May 24, 2012 22:42
SVN with Git Cheat Sheet
### Using git with a SVN server/repo
Sources
http://git-scm.com/book/en/Git-and-Other-Systems-Git-and-Subversion
http://viget.com/extend/effectively-using-git-with-subversion
git svn clone -s <url> <local_dir_name>
# setting up
git checkout -b <feature_branch>
@johnnyjung
johnnyjung / postgres_cheat_sheet
Created May 23, 2012 21:26
Postgres Cheat Sheet
Postgres Cheat Sheet
Source: Postgresql Documentation
### shell commands
creatuser <user>
deletesuer <user>
createdb -O <user> -E utf8 -T <template> <db_name>
dropdb <db_name>
@johnnyjung
johnnyjung / minecraft_ec2
Created May 21, 2012 02:05
Minecraft EC2 Server Setup
Instructions to setup a Minecraft server on an Amazon EC2 Micro instance
1. Go to instances, launch instance.
2. Select classic wizard, 32-bit Amazon Linux AMI, Micro instance type.
3. Set up key pair
4. Create new TCP rule and add 22, 25565
5. Launch instance
6. Go to elastic ips, and allocate/associate a new address
7. ssh ec2-user@[ip address]
8. sudo yum update
@johnnyjung
johnnyjung / postgres_rails_os_x
Created April 22, 2012 02:25
PostgreSQL with Rails on OS X
# Setting up and using PostgreSQL with Rails on OS X
# Allows you to use PostgreSQL instead of sqlite3, and have the same database type as Heroku
# Install postgres using homebrew
brew install postgres
# Follow directions provided by postgres installation
# Instructions for this part can be retrieved again using "brew info postgres"
# This creates a default user according to your system name
# If you encounter an error similar to this, then check out these helpful links