Skip to content

Instantly share code, notes, and snippets.

View mjard's full-sized avatar

Michael Jard mjard

  • Misadventure Games
View GitHub Profile
@mjard
mjard / bot.gridlang
Last active December 10, 2015 20:49
is it a bot yet?
# maybe we bit off more than we could chew
store GRIDSIZE << 12
<< GRIDSIZE
@start
minus << 1
dup
equal << 0
iftgoto << @up
@search
@mjard
mjard / bot.gridlang
Last active December 11, 2015 02:08
PunchBot Fork, Punching in multiple directions!
# maybe we bit off more than we could chew
@STEPSIZE 12
@start
# []
push @fullsweep
# [@fullsweep]
call
# []
@mjard
mjard / punchbotv3.gridlang
Last active December 11, 2015 04:19
it's like punchbot is getting smarter...
# maybe we bit off more than we could chew
@start
push 0
push @stackguard
call
push @fullsweep
call
push 1
import requests
import time
def getReddit(subreddit):
request = requests.get("http://reddit.com/r/%s/.json" % subreddit)
return request.json()['data']['children']
seen_ids = set()
while True:
@mjard
mjard / blah.go
Last active December 12, 2015 03:18 — forked from sirpengi/blah.go
package main
func modify (myarr *[]int) ([]int) {
return append(*myarr, 4)
}
func main() {
arr := []int{}
arr = append(arr, 1)
arr = append(arr, 2)