Skip to content

Instantly share code, notes, and snippets.

[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) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@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++) {
1: 2P Mirror Match
Game Erekose's Important Longbowman Theme:1 GMR:9549
Winning Teams: [<Team: #2 FilthyRobot>]
Losing Team: #1 erekose 1500.0
Score Difference: 0.0 Delta 16
Score: 16.0 for FilthyRobot, now 1516.0
Score: -16 for erekose, now 1484
Game Konohatensai's Innocent Landship Theme:1 GMR:9581
@gak
gak / badcert
Last active December 6, 2015 22:13
slack invalid certificate from my host
~ > openssl s_client -connect slack.com:443
CONNECTED(00000003)
depth=1 C = US, ST = California, L = Sunnyvale, O = Fortinet, OU = Certificate Authority, CN = FortiGate CA, emailAddress = support@fortinet.com
verify error:num=19:self signed certificate in certificate chain
---
Certificate chain
0 s:/C=US/ST=California/L=San Francisco/O=Slack Technologies, Inc/CN=*.slack.com
i:/C=US/ST=California/L=Sunnyvale/O=Fortinet/OU=Certificate Authority/CN=FortiGate CA/emailAddress=support@fortinet.com
1 s:/C=US/ST=California/L=Sunnyvale/O=Fortinet/OU=Certificate Authority/CN=FortiGate CA/emailAddress=support@fortinet.com
i:/C=US/ST=California/L=Sunnyvale/O=Fortinet/OU=Certificate Authority/CN=FortiGate CA/emailAddress=support@fortinet.com
@gak
gak / header
Last active December 11, 2015 07:48 — forked from anonymous/gist:4568544
%DEFAULT includepath pig/include.pig
RUN $includepath;
%DEFAULT time 60
-- for local mode: uncomment the next line and comment the one after that
--%DEFAULT old_snort_conf 'lib/snort-2905/etc/snort.conf'
%DEFAULT old_snort_conf '/mnt/var/lib/snort-2905/etc/snort.conf'
-- for local mode: uncomment the next line and comment the one after that
{
"Version": "2008-10-17",
"Id": "Policy1361081479235",
"Statement": [
{
"Sid": "Stmt1361081441897",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::772560792726:user/packetloop-s3"
},