Skip to content

Instantly share code, notes, and snippets.

View hophacker's full-sized avatar
💭
BEST OR SHIT

hophacker hophacker

💭
BEST OR SHIT
  • 苏州瑞立思科技有限公司
  • 苏州
View GitHub Profile
@hophacker
hophacker / Gist.sublime-settings
Created May 15, 2013 15:33
My first gist snippet
{
// Your username on GitHub
"username": "jokerfeng2010",
// Your password on GitHub
"password": "FJqq1314",
// Your GitHub API token
// see: https://github.com/condemil/Gist#generating-access-token
"token": "",
@hophacker
hophacker / a.cpp
Created May 15, 2013 15:38
Linter with cpp
')
@hophacker
hophacker / Default (Windows).sublime-keymap
Created May 15, 2013 17:38
Key_map_for_documentation
[
{"keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces"},
{"keys": ["f1"], "command": "goto_documentation"}
]
#Wed Jun 05 15:49:48 CST 2013
hey.i-feng.org
@hophacker
hophacker / index.md
Last active August 29, 2015 14:23 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@hophacker
hophacker / nginx.conf
Created October 1, 2015 09:46 — forked from atma/nginx.conf
Nginx + nodejs + socket.io websockets
# Add to nginx.conf http section
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
@hophacker
hophacker / start_rails.sh
Last active April 11, 2016 17:16
command for starting rails server
#!/bin/bash -
set -o nounset # Treat unset variables as an error
port=3002
search=false
RAILS_ENV=${RAILS_ENV:-development}
while getopts p:e:rw:s opt
do