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 / sublime-text-3-setup.md
Created July 25, 2019 08:38 — forked from ijy/sublime-text-3-setup.md
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@hophacker
hophacker / gist:7d11714d7b7aa5448c08772f11de9710
Created May 24, 2016 14:07 — forked from osipov/gist:c2a34884a647c29765ed
Install Scala and SBT using apt-get on Ubuntu 14.04 or any Debian derivative using apt-get
sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb
sudo dpkg -i scala-2.10.4.deb
sudo apt-get update
sudo apt-get install scala
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb
sudo dpkg -i sbt.deb
sudo apt-get update
sudo apt-get install sbt
@hophacker
hophacker / socket-cheatsheet.js
Created April 25, 2016 17:33 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@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 / 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