Skip to content

Instantly share code, notes, and snippets.

View TheSkorm's full-sized avatar

Michaela Wheeler TheSkorm

View GitHub Profile
@TheSkorm
TheSkorm / gist:8874424
Last active August 29, 2015 13:56
Javascript to get portal long and lat for ingress from iitc
a = "";
for (var key in portals) {
if (map.getBounds().contains(portals[key].getLatLng())){
nokeys = window.plugin.keys.keys[key];
if (nokeys == undefined) {
nokeys = 0
};
value = portals[key];
a = a + value.options.data.title.replace(",", ".") + "," + value.options.data.latE6 + "," + value.options.data.lngE6 + "," + nokeys + "\n"
}
@TheSkorm
TheSkorm / gist:9462819
Created March 10, 2014 10:41
Export G+ hangouts to an IRC like log.
for (var i = 0; i < a.length; i++){b = a[i]; if (b.className=="aO1"){name=b.innerText;} if (b.className=="aOT"){ c = c + "\n" +b.getElementsByClassName("aSy")[0].textContent + " <" + name + "> " + b.innerText } }
@TheSkorm
TheSkorm / gist:11143439
Created April 21, 2014 13:54
maxfields iitc export
def iitcexport(self):
textfile = open(self.outputDir+'iitc-import.txt','w')
textfile.write( "[")
first=True
for i in xrange(self.m):
p,q = self.orderedEdges[i]
for tri in self.a.edge[p][q]['fields']:
coords = np.array([ self.a.node[v]['xy'] for v in tri ])
iitcfield = []
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type='text/javascript' src='/js/lib/dummy.js'></script>

Keybase proof

I hereby claim:

  • I am theskorm on github.
  • I am mwheeler (https://keybase.io/mwheeler) on keybase.
  • I have a public key whose fingerprint is C500 3831 DEED 2370 8F11 26BB 275F 7BF6 8750 E308

To claim this, I am signing this object:

var fs = require('fs');
var obj = JSON.parse(fs.readFileSync('inventory', 'utf8'));
multiple = {}
for (i = 0; i < obj['gameBasket']['inventory'].length; i++) {
if ("portalCoupler" in obj['gameBasket']['inventory'][i][2]) {
var title = obj['gameBasket']['inventory'][i][2]['portalCoupler']['portalTitle'].replace("\"", "")
var locsplit = obj['gameBasket']['inventory'][i][2]['portalCoupler']['portalLocation'].split(',');
var latE6 = parseInt(locsplit[0], 16);
var lngE6 = parseInt(locsplit[1], 16);
@TheSkorm
TheSkorm / gist:eed9e8a224d9c06befc5
Created April 5, 2015 11:13
Bulk recycle keys ingress (sony z1)
while [ 1 ]
do
input tap $(expr 552 + $(expr $(expr $RANDOM / 2000) - 10)) $(expr 789 + $(expr $(expr $RANDOM / 2000) - 10))
sleep 0.$(expr $RANDOM / 6000)
input tap $(expr 950 + $(expr $(expr $RANDOM / 2000) - 10)) $(expr 1682 + $(expr $(expr $RANDOM / 2000) - 10))
sleep 0.$(expr $RANDOM / 6000)
input tap $(expr 700 + $(expr $(expr $RANDOM / 2000) - 10)) $(expr 1676 + $(expr $(expr $RANDOM / 2000) - 10))
sleep 0.$(expr $RANDOM / 6000)
input tap $(expr 218 + $(expr $(expr $RANDOM / 2000) - 10)) $(expr 1887 + $(expr $(expr $RANDOM / 2000) - 10))
sleep 0.$(expr $RANDOM / 6000)
@TheSkorm
TheSkorm / gist:cb9171e92d0db850363f
Last active October 7, 2021 13:55
ec2 download torrent
#!/bin/bash
#don't actually use this - it's silly
#sns needs to be setup
#ec2 role must have access to read tags, write to s3 and publish to sns
#start isntance with
#aws ec2 run-instances --image-id ami-fd9cecc7 --count 1 --instance-type t2.micro --key-name deb --security-group-ids sg-c948cbac --subnet-id subnet-ff9b3a9a --user-data "`base64 ~/download.sh`" --instance-initiated-shutdown-behavior terminate --associate-public-ip-address --iam-profile pirate
#set the download url with once you have the instanceid
#aws ec2 create-tags --resources i-54388388 --tags Key=URL,Value="http://cdimage.debian.org/debian-cd/8.0.0/amd64/bt-cd/debian-8.0.0-amd64-netinst.iso.torrent"
@TheSkorm
TheSkorm / gist:0ff0d8ba41703e99314d
Created May 5, 2015 12:27
hackish eeprom reader - may or may not work
void setup() {
// put your setup code here, to run once:
// port
// port l = data
// port c = address 8-13
// port a = address 0-7
DDRL = B00000000;
DDRC = B11111111;
DDRA = B11111111;