Skip to content

Instantly share code, notes, and snippets.

View skyuplam's full-sized avatar
🎯
shoooooooooting the 🌔

Terrence Lam skyuplam

🎯
shoooooooooting the 🌔
View GitHub Profile

Keybase proof

I hereby claim:

  • I am skyuplam on github.
  • I am terrencelam (https://keybase.io/terrencelam) on keybase.
  • I have a public key ASCpnW1doCBHumcvha9IukxW2DvxyCIXJcRTo3MtjKtEuAo

To claim this, I am signing this object:

@skyuplam
skyuplam / .tmux.conf
Last active November 12, 2019 12:58
tmux and vim config
set -g default-command 'reattach-to-user-namespace $SHELL --login'
set-option -g default-shell $SHELL
set -g default-terminal 'screen-256color'
setw -g automatic-rename off
setw -g mode-keys vi
setw -g mode-mouse on
setw -g mouse-select-pane on
setw -g mouse-utf8 on
unbind C-b

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@skyuplam
skyuplam / gist:ffb1b5f12d7ad787f6e4
Created October 13, 2014 07:50
Flask-Security and Flask-Admin example by Steve Saporata
# Example of combining Flask-Security and Flask-Admin.
# by Steve Saporta
# April 15, 2014
#
# Uses Flask-Security to control access to the application, with "admin" and "end-user" roles.
# Uses Flask-Admin to provide an admin UI for the lists of users and roles.
# SQLAlchemy ORM, Flask-Mail and WTForms are used in supporting roles, as well.
from flask import Flask, render_template
from flask.ext.sqlalchemy import SQLAlchemy
// ReadWriter.h
@interface ReadWriter
- (id)initWithFile:(NSString *)file;
@end
@interface ReadWriter (Reader)
- (NSData *)readError:(NSError * __autoreleasing *)error;
@end
@interface ReadWriter (Writer) // by using informal protocols we skip not implemented warnings from the compiler