Skip to content

Instantly share code, notes, and snippets.

@gmccreight
gmccreight / master.vim
Last active September 23, 2023 08:41
A script that gives you a playground for mastering vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@alanhamlett
alanhamlett / api.py
Last active January 24, 2023 21:03
Serialize SQLAlchemy Model to dictionary (for JSON output) and update Model from dictionary attributes.
import uuid
import wtforms_json
from sqlalchemy import not_
from sqlalchemy.dialects.postgresql import UUID
from wtforms import Form
from wtforms.fields import FormField, FieldList
from wtforms.validators import Length
from flask import current_app as app
from flask import request, json, jsonify, abort
@mytory
mytory / gist:6238053
Created August 15, 2013 03:33
my .bash_profile
export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\n\[\e[0m\]$ '
export PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH"
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
export EDITOR=nano
PATH=$PATH:/usr/local/mysql/bin
alias ls='gls --color=auto -F'
source .git-completion.bash
@remcoder
remcoder / typescript.sublime-build
Created October 1, 2012 19:48
Sublime Text 2 build system for Typescript
{
"selector": "source.ts",
"cmd": ["tsc", "$file"],
"file_regex": "^(.+?) \\((\\d+),(\\d+)\\)(: .+)$",
"line_regex": "\\((\\d+),(\\d+)\\)",
"osx": {
"path": "/usr/local/bin:/opt/local/bin"
@rkJun
rkJun / Back_to_the_Mac_20120805.css
Last active October 9, 2015 10:37
Safari, Google Chrome Font Style Sheet for Mac
//# Link (출처) : http://macnews.tistory.com/162
//# Safari/Google Chrome Korean Font Style Sheet for OS X Mountain Lion
//#
//# Google Chrome : ~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css
@font-face {
font-family: AppleGothic;
src: local("Apple SD Gothic Neo"),
local("Nanum Gothic");
}
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: