Skip to content

Instantly share code, notes, and snippets.

@illucent
illucent / StatusIcon.py
Created December 5, 2016 00:40 — forked from pklaus/StatusIcon.py
StatusIcon – A Simple Tray Icon Application Using PyGTK
#!/usr/bin/env python
# found on <http://files.majorsilence.com/rubbish/pygtk-book/pygtk-notebook-html/pygtk-notebook-latest.html#SECTION00430000000000000000>
# simple example of a tray icon application using PyGTK
import gtk
def message(data=None):
"Function to display messages to the user."
@illucent
illucent / gist:4462aa37bf124bee9a793e219e40993f
Created November 4, 2016 18:05 — forked from nickgarvey/gist:8229874
Go from a dom_id to an IP address for a libvirt domain
import libvirt
from xml.dom import minidom
DNSMASQ_LEASES = "/var/lib/libvirt/dnsmasq/default.leases"
def dom_id_to_ip(dom_id):
conn = libvirt.openReadOnly('qemu:///system')
dom = conn.lookupByID(dom_id)
output = dom.XMLDesc(0)
@illucent
illucent / DisableNonCountedBasicMotions.vim
Created November 1, 2016 11:35 — forked from jeetsukumaran/DisableNonCountedBasicMotions.vim
Disable Basic Motions if not Preceded By a Count
" Notes:
" (1) To enhance the ergonomics of this sufficiently to make it practical, at
" least, until your brain grows a new lobe dedicated to counting line offsets
" in the background while you work, you should either make sure you have
" something like the following in your `~/.vimrc`:
"
" set number
" if has('autocmd')
" augroup vimrc_linenumbering
" autocmd!
@illucent
illucent / Cliref.md
Created October 30, 2016 15:46 — forked from ezekg/Cliref.md
CLIRef.md
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.bash/cliref.md
/    \  \/|    | |   ||       _/ __ \  __\    copy/paste from whatisdb
\     \___|__  |_|_  ||    |   \  __/|_ |   http://pastebin.com/yGmGiDQX
 \________  /_____ \_||____|_  /____  /_|     [email protected]
 20160515 \/ 1527 \/         \/     \/

alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'

@illucent
illucent / skeleton-daemon.sh
Created October 29, 2016 22:39 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@illucent
illucent / skeleton-daemon.sh
Created October 29, 2016 22:39 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@illucent
illucent / The Technical Interview Cheat Sheet.md
Created October 11, 2016 23:01 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@illucent
illucent / The Technical Interview Cheat Sheet.md
Created October 11, 2016 23:01 — forked from coleifer/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@illucent
illucent / neural-style-instructions.md
Created October 7, 2016 19:53 — forked from ttur/neural-style-instructions.md
Instructions on setting up and running neural-style on CentOS and AWS G2, and how to create slideshow videos of the results with ffmpeg
@illucent
illucent / superformula.pde
Created September 5, 2016 16:07 — forked from brysonian/superformula.pde
Sketch to draw the Superformula and save it to a PDF.
import controlP5.*;
import processing.pdf.*;
float scaler = 50;
int m = 2;
float n1 = 1;
float n2 = 1;
float n3 = 1;