Skip to content

Instantly share code, notes, and snippets.

View linjunpop's full-sized avatar
🐚
Sleeping

Jun Lin linjunpop

🐚
Sleeping
View GitHub Profile
@linjunpop
linjunpop / nginx.conf
Created February 18, 2014 08:05
Rails Nginx configuration
upstream QAirServer_server{
server unix:/opt/QAirServer/shared/sockets/puma.sock fail_timeout=0;
}
server {
listen 443 default deferred ssl;
server_name qairapp.com;
root /opt/QAirServer/current/public;
@linjunpop
linjunpop / chruby.sh
Created June 26, 2014 07:00
System Wide chruby
if [ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ]; then
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
fi
Verifying that +linjunpop is my openname (Bitcoin username). https://onename.io/linjunpop
@linjunpop
linjunpop / qiniu-afnetworking.m
Last active August 29, 2015 14:19
UIImage 加载七牛图片,Retina 支持
#import "UIImageView+Qiniu.h"
#import <UIImageView+AFNetworking.h>
@implementation UIImageView (Qiniu)
- (void)qiniu_setImageWithURL:(NSURL *)url {
NSURLComponents *components = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO];
CGFloat scale = [[UIScreen mainScreen] scale];
@linjunpop
linjunpop / Textmate and RVM Gemset
Created November 15, 2011 01:22
Textmate and RVM Gemset
TM_RUBY: /Users/Jun/.rvm/bin/rvm-auto-ruby
GEM_HOME: env | grep GEM_HOME | awk '{ sub(/GEM_HOME=/, ""); print }'
GEM_PATH: env | grep GEM_PATH | awk '{ sub(/GEM_PATH=/, ""); print }'
@linjunpop
linjunpop / Gemfile
Created March 21, 2012 06:27
Capistrano deploy with multistage & gitflow
group :development do
gem 'capistrano'
gem 'capistrano-ext'
gem 'capistrano-gitflow'
gem 'capistrano_colors'
end
@linjunpop
linjunpop / README.md
Created April 5, 2012 01:38
Ctags command for rails project with RVM

Ctags command for rails project with RVM

$ ctags --extra=+f --exclude=.git --exclude=log --exclude=tmp --exclude=public --exclude=spec/fixtures --exclude=db --langmap="ruby:+.rake.builder.rjs" --languages=-javascript -R *
@linjunpop
linjunpop / Mac bootstrap.markdown
Created July 4, 2012 09:15
Mac bootstrap.markdown

install xCode

TODO

install xCode commandline-tools

TODO

install homebrew

@linjunpop
linjunpop / gem_make.out
Created July 10, 2012 07:56
fail to build ruby18_source_location native extensions on rbx-1.2.4
/usr/local/Cellar/rbenv/0.3.0/versions/rbx-1.2.4/bin/rbx extconf.rb
creating Makefile
make
gcc -I. -I/usr/local/Cellar/rbenv/0.3.0/versions/rbx-1.2.4/include -I/usr/local/Cellar/rbenv/0.3.0/versions/rbx-1.2.4/include -I. -I'/usr/local/Cellar/rbenv/0.3.0/versions/rbx-1.2.4/include' -fPIC -ggdb3 -O2 -fPIC -c ruby18_source_location.c
ruby18_source_location.c:2:18: error: node.h: No such file or directory
ruby18_source_location.c:24: error: expected specifier-qualifier-list before ‘NODE’
ruby18_source_location.c:28: error: expected specifier-qualifier-list before ‘NODE’
ruby18_source_location.c: In function ‘Init_ruby18_source_location’:
ruby18_source_location.c:54: error: ‘rb_cUnboundMethod’ undeclared (first use in this function)