Skip to content

Instantly share code, notes, and snippets.

View JC1738's full-sized avatar

Jim Castillo JC1738

  • San Francisco, CA
View GitHub Profile
@JC1738
JC1738 / Config
Last active February 15, 2018 07:04
CVIM
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
set typelinkhints
set nonumerichints
set cncpcompletion
" hello
" alias ':g' to ':tabnew google'
@JC1738
JC1738 / attachdocker
Created December 23, 2015 22:15
Attach command line to docker
eval "$(docker-machine env default)"
docker-machine regenerate-certs default
@JC1738
JC1738 / .inputrc
Created December 23, 2015 22:03
inputrc (tab completion on bash)
set completion-ignore-case on
set show-all-if-ambiguous on
TAB: menu-complete
@JC1738
JC1738 / .nanorc
Created December 23, 2015 22:00
nanorc
include "~/.nano/Dockerfile.nanorc"
include "~/.nano/apacheconf.nanorc"
include "~/.nano/arduino.nanorc"
include "~/.nano/asciidoc.nanorc"
include "~/.nano/asm.nanorc"
include "~/.nano/awk.nanorc"
include "~/.nano/c.nanorc"
include "~/.nano/cmake.nanorc"
include "~/.nano/coffeescript.nanorc"
include "~/.nano/colortest.nanorc"
@JC1738
JC1738 / .tmux.conf
Created December 23, 2015 21:59
TMUX conf
#using C-a as prefix
unbind C-b
set-option -g prefix C-a
bind C-a send-prefix
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-sessionist'
@JC1738
JC1738 / tmux.start.sh
Created December 23, 2015 18:36
Add to iTerm2 Profile Start for establishing TMUX session
#!/bin/sh
export PATH=$PATH:/usr/local/bin
# abort if we're already inside a TMUX session
[ "$TMUX" == "" ] || exit 0
# startup a "default" session if none currently exists
tmux has-session -t _default || tmux new-session -s _default -d
# present menu for user to choose which workspace to open
@JC1738
JC1738 / newtmux
Created December 23, 2015 18:18
open new tmux session on new tab in iterm2
#!/usr/bin/env osascript
on run argv
set AppleScript's text item delimiters to {" "}
set newpath to "cd " & argv
set tmuxstring to "tmux attach -t base || tmux new -s base"
tell application "iTerm"
make new terminal
tell the current terminal
activate current session
@JC1738
JC1738 / tab
Created December 23, 2015 17:56
Open new tab run a command in iterm2
#!/usr/bin/env osascript
on run argv
set AppleScript's text item delimiters to {" "}
tell application "iTerm"
make new terminal
tell the current terminal
activate current session
launch session "Default Session"
tell the last session

Graphing Widget

The graphing widget shows graphs using the Rickshaw graphing library. The names of data fields should be (vaguely) familiar if you've used Rickshaw before.

It's recommended that you replace the /assets/javascripts/rickshaw.min.js from your dashboard with the latest from here.

Supported HTML data fields

@JC1738
JC1738 / gist:9616706a83ba7706ab88
Created November 6, 2014 20:42
.tumux.config
set-window-option -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g mouse-resize-pane on
set-option -g mouse-select-window on
set-option -g default-shell /bin/bash
bind-key j page-up
bind-key ; page-down
# Fix LSOpenURLsWithRole() error on OS X. Requires reattach-to-user-namespace