Skip to content

Instantly share code, notes, and snippets.

View he9lin's full-sized avatar

Lin He he9lin

View GitHub Profile
@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 / atom-style.less
Last active August 29, 2015 14:03
Atom antialiased workspace
.editor {
-webkit-font-smoothing: antialiased;
}
@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

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 / 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
@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}"
config.vm.network :private_network, ip: "33.33.33.100"
config.vm.network :forwarded_port, guest: 3000, host: 3000
@he9lin
he9lin / chef_solo_bootstrap.sh
Last active December 15, 2015 01:29 — forked from ryanb/chef_solo_bootstrap.sh
Chef solo bootstrap with Berkshelf
```
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev libxslt-dev git-core autoconf bison libssl-dev libreadline6-dev libncurses5-dev
cd /tmp
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.gz
tar -xzf ruby-2.1.4.tar.gz
cd ruby-2.1.4/
./configure --prefix=/usr/local --with-readline-dir=/usr/include/readline
make
@he9lin
he9lin / Gemfile
Created May 26, 2012 14:19
Project Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.1'
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
gem 'compass', "0.12.alpha"
end
@he9lin
he9lin / AsyncTaskTests.java
Created March 25, 2012 14:29
How to test AsyncTask in Android
package jieqoo.android.KASS.test.tasks;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import jieqoo.android.models.RESTListener;
import jieqoo.android.models.RESTResponse;
import jieqoo.android.tasks.FetchRESTResponseTask;
import jieqoo.android.util.Configuration;
import android.test.InstrumentationTestCase;