Skip to content

Instantly share code, notes, and snippets.

We couldn’t find that file to show.
@gak
gak / gist:657276
Created October 31, 2010 22:48
homebrew cmake 2.8.2 compilation failure
brew install -vd cmake
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -w -pipe
CXXFLAGS: -O3 -w -pipe
MAKEFLAGS: -j4
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz
File already downloaded and cached to /Users/gak/Library/Caches/Homebrew
@gak
gak / gist:657282
Created October 31, 2010 22:52
cmake-2.8.2/Bootstrap.cmk/cmake_bootstrap.log
Try: /usr/bin/cc
Line: /usr/bin/cc -O3 -w -pipe cmake_bootstrap_18264_test.c -o cmake_bootstrap_18264_test
---------- file -----------------------
#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif
#include<stdio.h>
#!/bin/bash
cd `dirname $0`
tcpdump -n -i eth0 -G 86400 -w 'dumps/capture-%Y-%m-%dT%H:%M:%S.cap'
[achDescriptions setObject:@"Quit a level in rage" forKey:@"ragequitter"];
[achDescriptions setObject:@"Activated cheat mode" forKey:@"oops"];
[achDescriptions setObject:@"Finish any level for at least 10 rounds" forKey:@"newbie"];
[achDescriptions setObject:@"Not letting a creep escape" forKey:@"flawless"];
[achDescriptions setObject:@"Complete a level on hard" forKey:@"complete"];
[achDescriptions setObject:@"Every level finished on any skill" forKey:@"totality"];
[achDescriptions setObject:@"Every level finished on Hard skill" forKey:@"wellplayed"];
[achDescriptions setObject:@"Every level finished on Extreme skill" forKey:@"goodshow"];
[achDescriptions setObject:@"Not building a tier 3 tower" forKey:@"lowtech"];
[achDescriptions setObject:@"Build one of each tower on a level" forKey:@"variety"];
@gak
gak / Xcode4TestFlightintegration.sh
Created October 27, 2011 04:12 — forked from incanus/Xcode4TestFlightintegration.sh
Xcode 4 scheme Archive step Post-script for automatic TestFlight build uploading. See the blog post here: http://developmentseed.org/blog/2011/sep/02/automating-development-uploads-testflight-xcode
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
API_TOKEN=<TestFlight API token here>
TEAM_TOKEN=<TestFlight team token here>
SIGNING_IDENTITY="iPhone Distribution: Development Seed"
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision"
#LOG="/tmp/testflight.log"
@gak
gak / gist:3775150
Created September 24, 2012 09:39
poke firewall udp
#!/bin/bash
PORT=$((RANDOM + 1024))
HOST=$1
poke() {
echo "Sleeping"
for i in `seq 10`; do
echo "netcat $HOST $PORT"
echo hihihi\n\n\n | nc -u -p $PORT $HOST $PORT
@gak
gak / bench.groovy
Created November 20, 2012 22:47
Groovy script to test Titan edge lookup performance with different keys and labels
g = TitanFactory.open('test.properties')
r = new Random()
edges = 1e4
key = "poozd" + r.nextInt().toString() + r.nextInt().toString()
label = key + "s"
def newKey(g, name, type) {
return g
.makeType()
@gak
gak / robot.js
Created December 6, 2012 04:46
gakbot
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
this.left = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
for (var i = 0; i < 10; i++) {
@gak
gak / robot.js
Created December 6, 2012 04:46
gakbot
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);