This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Basic attempt at reading Tribes 1 .dts files | |
# Appears to be some sort of nested IFF-like block format | |
File.open(ARGV[0]) do |f| | |
pos = 0 | |
while !f.eof | |
f.seek pos | |
magic = f.read(4).unpack("L<")[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple redis client to test pubsub | |
# All clients will send the current time to 'chan' | |
# and print out any messages they receive. | |
require 'rubygems' | |
require 'em-hiredis' | |
EventMachine.run do | |
# Make $rl to listen | |
$rl = EM::Hiredis.connect | |
$rl.on(:message) do |channel, msg| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example usage | |
class Example | |
{ | |
public static function test() | |
{ | |
var bytes = new JSByteIO(new ArrayBuffer(128)); | |
// Writing and reading a line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
NSGoatString | |
NSGoatString - a "goat" (randomly substituted) string generator. | |
Copyright (C) 2009 James S Urquhart | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# [app name] [old revision] [new revision] | |
# | |
GIT_REPO="/srv/app_data/repository/$1.git" | |
TMP_GIT_CLONE="/tmp/_deploy_$1_clone" | |
PUBLIC_WWW="/srv/app_data/apps/$1" | |
OLD_REVISION=$2 | |
NEW_REVISION=$3 | |
IS_RAILSAPP=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to automate reserving tickets from amiando. | |
# Polls the site using chromedriver, automatically selecting 1 ticket | |
# and moving to the next step. | |
# | |
# Please use responsibly. | |
# | |
require 'rubygems' | |
require "selenium/webdriver" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Generate DTMF tones | |
// | |
#include <stdio.h> | |
#include <math.h> | |
float OutData[44100]; | |
typedef struct ToneInfo { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TorqueScript: Function Parameters vs Variables | |
// | |
// This simple demonstration illustrates the speed difference in | |
// passing function parameters as variables vs using the string stack, in a simple function | |
// which adds two numbers together. | |
// | |
// scriptTest1 technically incurs a penalty of converting the input variables to strings, while | |
// scriptTest2 instead looks up and assigns global variables. | |
// scriptTest3 which re-assigns variables in the function call is included to gauge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Time::HiRes qw ( time ); | |
my $PR = 0; | |
my $P0 = 0; | |
my $P1 = 0; | |
print "ENTRY\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note you will need to create a "getFunctionAddress" function in EngineFunctionInfo unless you use | |
// getProcAddress() & getBindingName() on the function exports. | |
void *getFunctionAddress() { return mAddress; } | |
// | |
// This example demonstrates the following: | |
// * calling "generateUUID" which is exported as a global function in the API. | |
// * constructing an instance of ColorI and setting its exposed fields. | |
// |