Skip to content

Instantly share code, notes, and snippets.

@haixuanc
haixuanc / .gitignore_global
Created April 15, 2015 17:51
A global .gitignore
# Run the following command in terminal to use it:
# $ git config --global core.excludesfile ~/.gitignore_global
# Reference: https://help.github.com/articles/ignoring-files/
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
@haixuanc
haixuanc / ubuntu-provision.md
Created May 6, 2015 19:53
ubuntu provision

solarized background color: #002b36 => rgb(0,43,54)

@haixuanc
haixuanc / tmux-tips.md
Last active August 29, 2015 14:21
Tmux Tips

Enable scrolling:

ctrl+b [

Press q to quit scrolling mode.

@haixuanc
haixuanc / docker-commands.md
Last active March 14, 2020 00:21
Essential Docker commands

Basic Commands

View all commands:

$ docker

Search for images

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
curl -Lo- http://bit.ly/janus-bootstrap | bash
#errored out...had to install git first, derrr
sudo apt-get install git
curl -Lo- http://bit.ly/janus-bootstrap | bash
# error! had to install rake next
sudo apt-get install rake
curl -Lo- http://bit.ly/janus-bootstrap | bash
@haixuanc
haixuanc / index.html
Last active August 29, 2015 14:26 — forked from anonymous/index.html
JS Bin // source https://jsbin.com/folufu
<!DOCTYPE html>
<html ng-app="uploadApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body ng-controller="UploadCtrl">
<file-uploader on-select="addFile(file)"></file-uploader>
@haixuanc
haixuanc / .vimrc
Last active August 26, 2015 19:36
My Vim configuration
" -----------------------------------------------------------------------------
" Plugins
"
" - Solarized color theme
" - Powerline
" - NERDTree
" - NERDCommenter
" - Command-T
" - Vim better whitespace
" - JSHint
@haixuanc
haixuanc / git-workflow.md
Last active September 30, 2018 19:47
Git workflow
  1. Hide local changes:

    $ git stash
  2. Fetch remote changes:

$ git fetch

Setup

Replace IRB with Pry (in your Gemfile) and Byebug with pry-byebug.

gem 'pry-rails', group: [:development, :test]
gem 'pry-byebug', group: [:development, :test]

Using PRY