Skip to content

Instantly share code, notes, and snippets.

import json
import datetime
from csv import writer
now = datetime.datetime.now()
"""
CONSUMER_KEY = 'XXX'
" GENERAL OPTIONS
behave xterm
set viminfo='20,\"500,%
set history=500 " keep {number} lines of command line history
set wrap " whether to wrap lines
set linebreak
" commands
" set number " number lines
set nocompatible
@khafatech
khafatech / get-code-unzip.sh
Last active August 29, 2015 13:59
get code from github and unzip (doesn't create a git repository)
#!/bin/bash
wget https://github.com/IanMitchell/sloth/archive/master.zip
unzip -o master.zip
rm master.zip
#!r6rs
(library (sosc) (export udp:socket? udp:open udp:send udp:recv udp:close tcp:socket? tcp:open tcp:send tcp:read tcp:close with-input-from-bytevector bytevector-section bytevector-find-index flatten-bytevectors bytevector-make-and-set1 bytevector-make-and-set decode-u8 decode-u16 decode-u32 decode-u64 decode-i8 decode-i16 decode-i32 decode-i64 decode-f32 decode-f64 decode-str decode-pstr decode-cstr encode-u8 encode-u16 encode-u32 encode-u64 encode-i8 encode-i16 encode-i32 encode-i64 encode-f32 encode-f64 encode-str encode-pstr encode-cstr read-pstr read-cstr read-bstr read-i16 read-u16 read-i32 read-u32 read-i64 read-u64 read-f32 read-f64 seconds-from-1900-to-1970 ntpr->ntp utc->ntpr ntp->utc read-ostr read-obyt read-value read-arguments read-message read-bundle hash-u8 read-packet decode-osc osc-display cstring-length osc-align padding-of encode-string encode-bytes encode-value encode-types encode-message encode-bundle-ntp encode-bundle encode-osc purify oI32 oI64 oU64 oF32 oF64 oSTR oBYT oMID message
@khafatech
khafatech / gist:5650325
Created May 25, 2013 18:59
sources 300 paper
=== java sec bugs
good overview: lots of links
http://www.slate.com/blogs/future_tense/2013/01/14/java_zero_day_exploit_don_t_patch_just_disable_java_in_your_browser.html
@khafatech
khafatech / test_parser.py
Created April 29, 2013 20:57
test parser.sml csc430
#!/usr/bin/env python
import os
P = True
F = False
tests = {"1;" : P,
"(1);" : P,
"1;\n2;" : P,
@khafatech
khafatech / gist:4965324
Created February 16, 2013 03:03
dining phylosophers output.
./dine 10
|=============|=============|=============|=============|=============|
| A | B | C | D | E |
|=============|=============|=============|=============|=============|
| 0---- | ----- | ----- | ----- | ----- |
| 01--- | ----- | ----- | ----- | ----- |
| 01--- Eat | ----- | ----- | ----- | ----- |
| 01--- Eat | --2-- | ----- | ----- | ----- |
| 01--- Eat | --2-- | ---3- | ----- | ----- |
| 01--- Eat | --2-- | ---3- | ----4 | ----- |
g++ -DGL_GLEXT_PROTOTYPES -Wall -g -Wno-unknown-pragmas main.o MStackHelp.o GLSL_helper.o Shader.o ModelManager.o GameObject.o GameDrawableObject.o GameKartObject.o GamePhysics.o GamePhysicsActor.o GameRamp.o GameUtilities.o -o kpp ./glfw/lib/x11/libglfw.a -lXxf86vm -lXext -lrt -lX11 -lGLU -lGL -pthread -lm
GamePhysics.o: In function `GamePhysics::GamePhysics()':
CityTrial/GamePhysics.cpp:19: undefined reference to `physx::PxDefaultErrorCallback::PxDefaultErrorCallback()'
CityTrial/GamePhysics.cpp:19: undefined reference to `physx::PxDefaultErrorCallback::~PxDefaultErrorCallback()'
CityTrial/GamePhysics.cpp:22: undefined reference to `PxCreateFoundation'
CityTrial/GamePhysics.cpp:27: undefined reference to `physx::PxProfileZoneManager::createProfileZoneManager(physx::PxFoundation*)'
CityTrial/GamePhysics.cpp:42: undefined reference to `physx::PxDefaultCpuDispatcherCreate(unsigned int, unsigned int*)'
CityTrial/GamePhysics.cpp:48: undefined reference to `physx::PxDefaultSimulationFilterShader(unsigned int, p
g++ -c -DGL_GLEXT_PROTOTYPES -Wall -g -g -D_DEBUG -I./glfw/include -I./physx/Include -o GameKartObject.o GameKartObject.cpp
In file included from ./physx/Include/foundation/PxString.h:41,
from ./physx/Include/PxPhysicsAPI.h:64,
from GamePhysics.h:14,
from GameKartObject.h:13,
from GameKartObject.cpp:4:
./physx/Include/foundation/linux/PxLinuxString.h:40: warning: ignoring #pragma warning
./physx/Include/foundation/linux/PxLinuxString.h:41: warning: ignoring #pragma warning
./physx/Include/foundation/linux/PxLinuxString.h:70: warning: ignoring #pragma warning
In file included from ./physx/Include/foundation/PxIntrinsics.h:42,
#!/bin/bash
# The "Arc" challenge done in a horrible way with netcat and bash. :P
# http://arclanguage.org/item?id=722
#
# Point the browser to http://localhost:9000 after running the script.
http200="HTTP/1.0 200 OK
Content-Type: text/html