Skip to content

Instantly share code, notes, and snippets.

View justinzane's full-sized avatar

Justin Zane Chudgar justinzane

View GitHub Profile
@justinzane
justinzane / grub.cfg
Created February 13, 2015 02:12
jz-rs-01 /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
@justinzane
justinzane / etc_config_network
Created February 6, 2015 21:41
OpenWRT etc config network WDR3600
config globals 'globals'
option ula_prefix 'fd05:960e:9254::/48'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device ' switch0'
option vlan '1'
option ports '0t 2 3 4 5 6'
#textdomain wesnoth-loti
# "plague"
#define WEAPON_SPECIAL_PLAGUE_TYPE_LOTI TYPE LANGUAGE_TYPE
[plague]
id=plague({TYPE})
name= _ "plague ("+{LANGUAGE_TYPE}+_")"
description= _ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a unit identical to and on the same side as the unit with the Plague attack. This doesn’t work on Undead or units in villages."
#ifver WESNOTH_VERSION >= 1.11.2
@justinzane
justinzane / gist:713d36792d37e3876292
Created December 7, 2014 01:47
Wesnoth Custom Ability
-----> utils/abilities.cfg
#define ABILITY_ARCANE_ENSLAVEMENT
[dummy]
id=arcane enslavement
name= _ "arcane enslavement"
female_name= _ "arcane enslavement"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit has the highly special power to enslave anyone who attacks them using magic or magical weapons. The enslavement is permanent for the life of the Master. Should this unit die, it's slaves will become their old selves, which just might be dangerous."
#else
description= _ "Arcane enslavement:
@justinzane
justinzane / gist:07737f7269f6da61aa5e
Created June 17, 2014 14:39
cm-11.0 moto_MSM8960 error
07:25:55 justin@justin-14z:~/src/CM/android/system$ breakfast moto_msm8960
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/motorola/moto_msm8960/cm.mk]]: "vendor/motorola/moto_msm8960/moto_msm8960-vendor.mk" does not exist. Stop.
Device moto_msm8960 not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_motorola_moto_msm8960
Default revision: cm-11.0
Checking branch info
CyanogenMod/android_device_motorola_moto_msm8960 already exists
Syncing repository to retrieve project.
Fetching project CyanogenMod/android_device_motorola_moto_msm8960
@justinzane
justinzane / network
Created March 8, 2014 04:11
OpenWRT+OpenVPN Configs
~ # cat /etc/config/network
config globals 'globals'
option ula_prefix 'fd05:960e:9254::/48'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
@justinzane
justinzane / openvpn-sketch
Created March 5, 2014 20:10
OpenVPN Sketch
##########################
# OpenVPN Cloud Server #
# `jz-rs-01` #
# eth0 123.123.123.123 #
# eth1 192.168.3.0/24 #
##########################
| | | |
-------------- | | |
| | | |
####################### | | |
@justinzane
justinzane / winmgr.cpp
Created November 15, 2013 07:04
winmgr.cpp
void winmgr::listener_() {
Uint64 count = 0;
while (!(stop_listener_.load())) {
count++;
zmq::message_t req;
// Wait for next request from client
try {
zmqsock_.recv (&req);
} catch (zmq::error_t &e) {
fprintf(stderr, "Iter[%lu] ZMQ Error: %d : %s\n", count, e.num(), e.what());
@justinzane
justinzane / wesnoth_profile_build_output
Created September 14, 2013 22:18
profile build error
/usr/sbin/ccache g++ -o build/profile/game_preferences_display.o -c -std=c++0x -pthread -W -Wall -pg -D_GNU_SOURCE=1 -D_REENTRANT -DHAVE_LIBDBUS -DHAVE_CONFIG_H -DHAVE_CXX0X -D_X11 -DWESNOTH_PREFIX='"/usr/local"' -I. -Isrc -I/usr/include -I/usr/include/SDL -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include src/game_preferences_display.cpp
/usr/sbin/ccache g++ -o build/profile/hotkey_preferences_display.o -c -std=c++0x -pthread -W -Wall -pg -D_GNU_SOURCE=1 -D_REENTRANT -DHAVE_LIBDBUS -DHAVE_CONFIG_H -DHAVE_CXX0X -D_X11 -DWESNOTH_PREFIX='"/usr/local"' -I. -Isrc -I/usr/include -I/usr/include/SDL -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/dbus-1.0 -I/usr/lib/db
@justinzane
justinzane / pareto.py
Created September 7, 2013 19:14
Sample Pareto Generator
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 7 07:20:11 2013
@author: justin
"""
import numpy as np
from matplotlib import pyplot as pp
import random