Skip to content

Instantly share code, notes, and snippets.

View rgbkrk's full-sized avatar
🌎
Think globally, act locally

Kyle Kelley rgbkrk

🌎
Think globally, act locally
View GitHub Profile
@rgbkrk
rgbkrk / exit.md
Created February 13, 2015 16:23
What's an exit?
$ python
Python 2.7.9 (default, Feb  4 2015, 17:42:56)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> type(exit)
<class 'site.Quitter'>
&gt;&gt;&gt; exit.__class__()
@rgbkrk
rgbkrk / cat-yarn.png
Last active August 29, 2015 14:11
Yarn Cat
cat-yarn.png
@rgbkrk
rgbkrk / CPUs and cgroups.ipynb
Last active August 29, 2015 14:10
CPUs and cgroups
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rgbkrk
rgbkrk / tmpnb.iptables.sh
Created November 6, 2014 01:31
oh my iptables nature ipython jupyter tmpnb demo
root@nature-more-capacity-1:~# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 8000
DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 8000
Chain INPUT (policy ACCEPT)
target prot opt source destination
@rgbkrk
rgbkrk / sound_chooser.py
Created November 2, 2014 19:40
Sound selection
from IPython.html.widgets import interact, interactive, fixed
from IPython.html import widgets
from IPython.display import display
def spectogram(sound_file):
IPython.display.Audio(filename=sound_file)
interact(spectogram, sound_file={"Lion": "lion.wav", "Sine Wave": "sin.wav", "Square Wave": "sq.wav"});
@rgbkrk
rgbkrk / cleanup.service
Last active August 29, 2015 14:08
Fleet and nbviewer
[Unit]
Description=Cleanup Service
[Service]
Type=oneshot
ExecStart=-/usr/bin/bash -c \
"/usr/bin/docker rmi $(/usr/bin/docker images -q --filter 'dangling=true')"
User=core
[X-Fleet]
[Unit]
Description=NotebookViewer
Requires=docker.service
Requires=etcd.service
After=docker.service
After=etcd.service
[Service]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.