Skip to content

Instantly share code, notes, and snippets.

View he9lin's full-sized avatar

Lin He he9lin

View GitHub Profile
config.vm.network :private_network, ip: "33.33.33.100"
config.vm.network :forwarded_port, guest: 3000, host: 3000
@he9lin
he9lin / .tmux.conf
Last active August 19, 2023 21:00
My tmux conf file
# After reloading the configuration file, we can send [command] to an application
# running within tmux simply by pressing [command] twice.
set -g prefix C-n
bind C-n send-prefix
set-option -g default-shell /bin/zsh
# Splitting panes
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
@he9lin
he9lin / hadoop-env.sh
Created June 26, 2013 06:13
Sample hadoop env for pseudo-distributed environment
# Set Hadoop-specific environment variables here.
# The only required environment variable is JAVA_HOME. All others are
# optional. When running a distributed configuration it is best to
# set JAVA_HOME in this file, so that it is correctly defined on
# remote nodes.
# The java implementation to use. Required.
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

@he9lin
he9lin / .vimrc
Created November 28, 2013 00:47
My vim configuration
set nocompatible " must be the first line
filetype on
filetype indent on
filetype plugin on
call pathogen#infect()
syntax on
" Set color theme
let g:cange_style = 'dark'
colorscheme cange
@he9lin
he9lin / atom-style.less
Last active August 29, 2015 14:03
Atom antialiased workspace
.editor {
-webkit-font-smoothing: antialiased;
}
@he9lin
he9lin / rbenv-zsh
Created August 10, 2014 18:11
Install rbenv on .zshrc
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
type rbenv
@he9lin
he9lin / simple2.zsh-theme
Created August 12, 2014 19:35
Simple cyan zsh theme
PROMPT='%{$fg[cyan]%}%~%{$fg_bold[cyan]%}$(git_prompt_info)%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
ZSH_THEME_GIT_PROMPT_DIRTY=" ✗"
ZSH_THEME_GIT_PROMPT_CLEAN=" ✔"
@he9lin
he9lin / local_3000.conf
Created August 20, 2014 02:19
Local SSH setup on Ngnix
upstream local_3000 {
server 127.0.0.1:3000;
}
server {
server_name 3000.local;
listen 80;
listen 443 default ssl;
send_timeout 3600; # For debugging with breakpoints
@he9lin
he9lin / paginated.rb
Created September 4, 2014 06:44
Simple Paginate
#= Paginated
#
# Usage:
#
# customers = store.customers.extend Paginated
# customers.per_page(5) # defaults to 25
# customers.page(0) # returns an array
#
# count
# where.limit