Skip to content

Instantly share code, notes, and snippets.

View wchargin's full-sized avatar

wchargin wchargin

View GitHub Profile
@wchargin
wchargin / obj2android.sh
Last active August 29, 2015 14:03
Format obj, tri, phi files, and push to an Android device
#!/bin/bash
# Set these up!
FORMATOBJ=
OBJ2TRI=
TRI2PHI=
PREFIX="/sdcard/car"
ADB="$(which adb)"
if [ -z "$1" ]; then
@wchargin
wchargin / histfreq.sh
Created July 31, 2014 05:03
most frequent commands under bash_eternal_history configuration
# histfreq
# history frequency for bash_eternal_history configuration
# see: http://stackoverflow.com/a/19533853/732016
# adapted from http://superuser.com/a/250230/121273
DEFAULT_LINE_COUNT=10
line_count=$1
if [ -z "$1" ]; then
line_count=$DEFAULT_LINE_COUNT
fi
@wchargin
wchargin / svg2pjs.py
Created August 24, 2014 19:35
SVG to Processing.JS
# svg2pjs - SVG to Processing.JS converter
import re
def command(s, last=None, lastcp=None, scale=1.0):
first = s[0]
absolute = first.istitle()
first = first.lower()
if first == 'z':
@wchargin
wchargin / app.yaml
Created July 6, 2015 18:20
source for gae-sandbox-997.appspot.com
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /_ah/pipeline(/.*)?
script: pipeline.handlers._APP
- url: /.*
script: main.application
@wchargin
wchargin / transforms.py
Created August 18, 2015 01:55
affine transforms on PIL images
"""A library for describing and applying affine transforms to PIL images."""
import numpy as np
import PIL.Image
class RGBTransform(object):
"""A description of an affine transformation to an RGB image.
This class is immutable.
@wchargin
wchargin / lattice_paths_demo.tex
Created October 28, 2015 06:24
paths and polygons on a lattice (or in general, I guess)
\documentclass{article}
\usepackage{wcsetup} % github:wchargin/wclatex
\usepackage{tikz}
\begin{document}
\tikzset{
latticept/.style={
red,
@wchargin
wchargin / .xsession-errors
Created November 9, 2015 21:39
.xsession-errors relating to crash described in linuxmint/cinnamon#4800
/etc/mdm/Xsession: Beginning session setup...
localuser:wchargin being added to access control list
Script for none started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
@wchargin
wchargin / .xsession-errors
Created November 10, 2015 02:38
Another .xsession-errors log from a Cinnamon crash
/etc/mdm/Xsession: Beginning session setup...
localuser:wchargin being added to access control list
Script for none started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
@wchargin
wchargin / .xsession-errors
Created November 14, 2015 06:47
control log: no Cinnamon restart
/etc/mdm/Xsession: Beginning session setup...
localuser:wchargin being added to access control list
Script for none started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
@wchargin
wchargin / .xsession-errors
Created December 2, 2015 18:56
Super clean log!
/etc/mdm/Xsession: Beginning session setup...
localuser:wchargin being added to access control list
Script for none started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
Script for none started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-G77rsF
SSH_AUTH_SOCK=/run/user/1000/keyring-G77rsF/ssh