Skip to content

Instantly share code, notes, and snippets.

View jeffschwartz's full-sized avatar

Jeff Schwartz jeffschwartz

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@jeffschwartz
jeffschwartz / .tmux.conf
Created January 14, 2014 18:41
tmux configuration file. goes in ~.
# delay time
set -sg escape-time 1
# 256 colors
set -g default-terminal "screen-256color"
# a mouse
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
@jeffschwartz
jeffschwartz / .jshintrc
Last active January 3, 2016 05:59
jshintrc file. Place it in ~
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
@jeffschwartz
jeffschwartz / ProxyJS.js
Last active June 19, 2021 14:48
ProxyJS is a small JavaScript library that provides the ability to proxy any function or object property method. It includes an API and you can extend it with additional functionality to fit your particular use case. Enjoy!
function proxy(){
var proxyFactory = function(){
//The wrapped function to call.
var fnToCall = arguments.length === 2 ? arguments[0][arguments[1]] : arguments[0];
//A counter used to note how many times proxy has been called.
var xCalled = 0;
@jeffschwartz
jeffschwartz / sample5.js
Created January 10, 2014 23:04
Test for embedding gist in blog
function proxy(){
var proxyFactory = function(){
var fnToCall = arguments.length === 2 ? arguments[0][arguments[1]] : arguments[0];
var fn = function(){
var args = [].slice.call(arguments);
fnToCall.apply(this, args);
};
return fn;
@jeffschwartz
jeffschwartz / .vimrc
Last active January 1, 2016 01:19
My latest .vimrc file. Includes setting for Syntastic.
au!
"
" pathogen settings
"
call pathogen#infect()
"
" always show the status line
@jeffschwartz
jeffschwartz / typical sublime project file
Created December 4, 2013 14:47
Typical Sublime project file (projectname.sublime-project), including settings for TernJS.
{
"folders":
[
{
"follow_symlinks": true,
"path": "."
}
],
"ternjs": {
"libs": ["jquery"],
@jeffschwartz
jeffschwartz / Preferences.sublime-settings
Last active December 27, 2015 16:49
My Sublime Text 3 User Preferences File.
{
"auto_complete": true,
"auto_complete_commit_on_tab": true,
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
@jeffschwartz
jeffschwartz / gist:6756446
Created September 29, 2013 20:54
Shim RequireJS define method allowing CoccyxJS to be used without RequireJS
(function(){
'use strict';
window.define = function define(){
(arguments[arguments.length - 1])();
};
}());
@jeffschwartz
jeffschwartz / package.json
Created May 26, 2013 22:23
My started package.json for a typical ExpressJS/ejs Node aApp
{
"name": "application-name",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "~3.2.5",
"ejs": "~0.8.4",
"less-middleware": "*",
"express-ejs-layouts": "~0.3.1"
},