Skip to content

Instantly share code, notes, and snippets.

View koesbong's full-sized avatar

Koes Bong koesbong

View GitHub Profile
@koesbong
koesbong / tmux.cheat
Created August 23, 2016 20:05 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@koesbong
koesbong / amz-s3-bucket-policy
Created August 16, 2016 18:04 — forked from alicial/amz-s3-bucket-policy
Amazon S3 Bucket Policy to prevent hot linking
{
"Version": "2008-10-17",
"Id": "0c762de8-f56b-488d-a4a4-20d1cb31df2f",
"Statement": [
{
"Sid": "Allow in my domains",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@koesbong
koesbong / README.md
Created January 20, 2016 06:18 — forked from Dr-Nikson/README.md
Auth example (react + redux + react-router)
We’ve built a new communication protocol that sends messages with a restricted syntax.
We need to write a function which determines whether a given message is syntactically valid or not.
Here are the rules:
1. There are 15 valid characters in the protocol: the lower-case characters ‘a’ through ‘j’
and the uppercase characters ‘Z’, ‘M’, ‘K’, ‘P’, and ‘Q’.
2. Every lower-case character in isolation is a valid message, e.g., ‘a’ is a valid message.
3. If σ is a valid message then so is Zσ.
4. If σ and τ are valid messages then so are Mστ , Kστ , Pστ , and Qστ .
5. All other messages are invalid.
@koesbong
koesbong / jquery-context.js
Created March 16, 2012 23:54 — forked from jpcody/jquery-context.js
Maintaining an object and selector context with jQuery
var object = {
handler : function(){
$("selector").on( "click", _.bind( this.doSomething, this ));
},
doSomething : function(e){