Skip to content

Instantly share code, notes, and snippets.

View justinian's full-sized avatar
🦇
What a horrible night to have a curse.

Justin Miller justinian

🦇
What a horrible night to have a curse.
View GitHub Profile
@justinian
justinian / pyrunner.c
Created May 14, 2014 19:53
Simple C app to run a python file
#include <stdio.h>
#include <stdlib.h>
#include <Python.h>
#ifndef PYTHON_FILE
#error "Please define PYTHON_FILE."
#endif
int main(int argc, char **argv)
{
#!/bin/sh
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh
set -e
# Must be a valid filename
NAME=foo
PIDFILE=/var/run/$NAME.pid
#This is the command to be run, give the full pathname
DAEMON=/usr/local/bin/bar
@justinian
justinian / goggles.ino
Created June 22, 2014 18:54
Janice's Goggles
#include <Adafruit_NeoPixel.h>
#define PIN 1
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(32, PIN);
uint32_t colors[] = {
0xdf151a,
0xfd8603,
0xf4f328,
@justinian
justinian / keybase.md
Created October 25, 2014 20:50
Keybase Identity

Keybase proof

I hereby claim:

  • I am justinian on github.
  • I am justinian (https://keybase.io/justinian) on keybase.
  • I have a public key whose fingerprint is 3E24 8983 8CD6 6D05 1725 C3F4 3FDD DA41 FF70 ADE1

To claim this, I am signing this object:

@justinian
justinian / mac_build.sh
Last active August 29, 2015 14:23
Personal Mac build script
#!/bin/sh
ruby -e "$(curl -fsSL 'https://raw.githubusercontent.com/Homebrew/install/master/install')"
brew tap caskroom/cask
brew install caskroom/cask/brew-cask
brew install \
ctags \
git \
go \
#!/usr/bin/env bash
# SEE YOU SPACE COWBOY by DANIEL REHN (danielrehn.com)
# Displays a timeless message in your terminal with cosmic color effects
# Usage: add "sh ~/seeyouspacecowboy.sh; sleep 2" to .bash_logout (or similar) in your home directory
# (adjust the sleep variable to display the message for more seconds)
# Cosmic color sequence
@justinian
justinian / tmux.cheat
Last active August 29, 2015 14:26 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@justinian
justinian / awsexport.py
Created November 6, 2015 19:36
AWS credential exporter from .aws/credentials to environment vairables
#!/usr/bin/env python
import os
import os.path
from ConfigParser import SafeConfigParser
HOME = os.environ["HOME"]
CREDS = os.path.join(HOME, ".aws", "credentials")
def error(message):
@justinian
justinian / marquee.py
Created July 1, 2015 23:51
Python rainbow marquee
#!/usr/bin/env python
import sys
colors = [160, 196, 202, 208, 214, 220, 226, 190, 154, 118, 46, 47, 48, 49, 51, 39, 27, 21, 57, 93]
ncolors = len(colors)
def reset():
sys.stdout.write("\033[?25h")
sys.stdout.write("\033[m")
@justinian
justinian / sourceindex.md
Created January 9, 2017 16:41 — forked from baldurk/sourceindex.md
Source indexing for github projects

Symbol Servers

I'm assuming you are familiar with symbol servers - you might not have one set up yourself for your own projects, but you probably use Microsoft's public symbol server for downloading symbols for system DLLs.

For your own projects it might be useful to set up a symbol server - I won't go into how you do that here since it's well documented elsewhere, but basically you just set up a folder somewhere - say X:\symbols\ or \servername\symbols or even http://servername.foo/symbols/ which has a defined tree structure:

symbols/
symbols/mymodule.pdb/
symbols/mymodule.pdb/123456789012345678901234567890122/