Skip to content

Instantly share code, notes, and snippets.

View phillco's full-sized avatar

Phil Cohen phillco

View GitHub Profile
@phillco
phillco / tab_color.fish
Last active August 29, 2015 13:56 — forked from wadey/iterm2.zsh
Functions to set iTerm2 tab color in fish
function tab_color --description "Sets the current tab color. Usage: tab_color <r> <g> <b>"
echo -ne "\033]6;1;bg;red;brightness;$argv[1]\a"
echo -ne "\033]6;1;bg;green;brightness;$argv[2]\a"
echo -ne "\033]6;1;bg;blue;brightness;$argv[3]\a"
end
function tab_nocolor --description "Resets the current tab color."
echo -ne "\033]6;1;bg;*;default\a"
end
@phillco
phillco / ipython_magic_function_inspector.py
Created May 5, 2017 18:25 — forked from bradmontgomery/ipython_magic_function_inspector.py
An IPython Magic function that will pretty-print python objects with syntax highlighting.
"""
An IPython magic function to pretty-print objects with syntax highlighting.
See, "Defining your own magics":
http://ipython.org/ipython-doc/stable/interactive/reference.html#defining-your-own-magics
For more on Pygments:
http://pygments.org/docs/quickstart/
Usage