Skip to content

Instantly share code, notes, and snippets.

ssh-keygen -R 45.79.187.10
@Sunnyztj
Sunnyztj / gist:31bb9af082cb4c0cb508
Created November 30, 2015 04:18
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
solution:
mysql.server start
gem install eventmachine -- --with-cppflags=-I/usr/local/opt/openssl/include
brew link openssl --force
can fix :
em::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/a111/.rvm/rubies/ruby-2.1.0/bin/ruby -r ./siteconf20151127-62751-5mbyqe.rb extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
@Sunnyztj
Sunnyztj / gist:f5a79201b47820f9746d
Last active November 13, 2015 11:12
合并多个columns
ALTER TABLE postcodes2 ADD COLUMN name
Update postcodes2 SET name = city|| ' ,' || state || ' ,' || pcode
@Sunnyztj
Sunnyztj / digital_ocean_setup.md
Last active May 30, 2016 23:46 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh [email protected]

The first thing we will do on our new server is create the user account we'll be using to run our applications and work from there.

@Sunnyztj
Sunnyztj / gist:ff9cfc7bb9323e1f5ab9
Created October 12, 2015 07:54
git ignore in global
echo .DS_Store > ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
@Sunnyztj
Sunnyztj / Sublime Text License Key
Last active February 26, 2016 15:02
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.
Tags: Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version
Go to menu Help > Enter License.
—– BEGIN LICENSE —–
Ryan Clark
Single User License
EA7E-812479
2158A7DE B690A7A3 8EC04710 006A5EEB
gemfile:
gem 'activeadmin', github: 'activeadmin'
@Sunnyztj
Sunnyztj / gist:0176a311e9f20d37aec6
Created August 13, 2015 02:52
fontawesome cheatsheet
http://fontawesome.io/cheatsheet/
@Sunnyztj
Sunnyztj / gist:ad83e502d03638e1f751
Created July 14, 2015 06:58
reveal sim breakpoint setup
http://support.revealapp.com/kb/getting-started/integrating-reveal-load-reveal-without-changing-your-xcode-project