Skip to content

Instantly share code, notes, and snippets.

View jedahan's full-sized avatar
💀
.

Jonathan Dahan jedahan

💀
.
View GitHub Profile

TGNS

Welcome to [TacticalGamer.com][tg]'s open-source mods repository. See the [TGNS open-source mods repository][forum] forum thread for more info. Mods in this repository are based on xToken's [DAK Admin Kit][dak]. There are a lot of customizations on [the server][tgns], but some of the highlights include:

Captains: Start a captains game, like a pickup game/gather/dodgeball

@jedahan
jedahan / ouch.md
Last active December 10, 2015 18:58

device_dashboard

An app for controlling in-gallery kiosks

What it does

Shows which machines in the galleries are pingable and still running their intended applications. Also helps run remote commands for rebooting, updating, etc.

#!/bin/sh
VBM=VBoxManage
VMNAME="smartos2"
VBDIR=$($VBM list systemproperties | awk '/^Default.machine.folder/ { print $4 }')
DISK=1024 # MB
RAM=512 # MB
VRAM=128 # MB
mkdir -p "${VBDIR}/${VMNAME}" && cd $_
[[ -f ${VMNAME}.iso ]] || curl -C - -o "${VMNAME}.iso" https://download.joyent.com/pub/iso/latest.iso
MD5=$(curl -C - https://download.joyent.com/pub/iso/md5sums.txt | awk '/latest.iso$/ { print $1}')

Here is an api built off the metropolitan museum's [collections][collections] website

A testing version is available on [collections-api.herokuapp.com][testing]

Questions, bug reports and feature requests are appreciated, please submit them to [github issues][issues]

This repository and its contents are [CC0][]

Dedicated to the memory of [Aaron Swartz][]

@jedahan
jedahan / gist:4772956
Created February 12, 2013 20:10
coffeescript wat?
~/c/c/n/coffee-script-redux ❯❯❯ ./bin/coffee
coffee> ->
[Function]
coffee> [Function]
[ [Function: Function] ]
coffee> Function
[Function: Function]
coffee>
Plain or Fancy
Dependencies
* [bower] for client libraries
* [couchdb] for the database
* [foreman] for orchestrating the database, preprocessors and server
Make sure to add your twitter credentials:
@jedahan
jedahan / caesar.c
Last active December 14, 2015 14:38
caesar encoding
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char secret[] = "MY SECRET STRING";
int main(int argc, char *argv[]) {
char encoded[strlen(secret)];
int i;
@jedahan
jedahan / shapeIntersection.pde
Created October 3, 2013 21:11
Make sure to install geomerative library in processing (Sketch -> Import Library -> Add Library)
import geomerative.*;
RShape shp1;
RShape shp2;
RShape shp3;
RShape cursorShape;
void setup()
{
size(400, 400);
@jedahan
jedahan / blah.cpp
Created November 11, 2013 20:29
polyline weirdness
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ofSetCircleResolution(6);
_x = ofGetWidth()/2;
_y = ofGetHeight()/2;
_r = ofGetWidth()/5;
@jedahan
jedahan / reciever.ino
Last active December 29, 2015 01:29
For some reason, I am only getting a signal for xPin (packet[0]) and packet[1] does not move...
#include <TimerOne.h>
const byte xPin = 9;
const byte yPin = 10;
const byte ledPin = 3;
const byte period = 32; // for 8 bit DAC
unsigned char packet[3];
void setup(void)