Skip to content

Instantly share code, notes, and snippets.

View TheSkorm's full-sized avatar

Michaela Wheeler TheSkorm

View GitHub Profile
/**
* This sample demonstrates a simple driver built against the Alexa Lighting Api.
* For additional details, please refer to the Alexa Lighting API developer documentation
* https://developer.amazon.com/public/binaries/content/assets/html/alexa-lighting-api.html
*/
var https = require('https');
var REMOTE_CLOUD_BASE_PATH = '/';
var REMOTE_CLOUD_HOSTNAME = 'www.amazon.com';
var https = require('https');
/**
* This sample demonstrates a simple driver built against the Alexa Lighting Api.
* For additional details, please refer to the Alexa Lighting API developer documentation
* https://developer.amazon.com/public/binaries/content/assets/html/alexa-lighting-api.html
*/
var https = require('https');
var REMOTE_CLOUD_BASE_PATH = '/';
var REMOTE_CLOUD_HOSTNAME = 'www.amazon.com';
var https = require('https');
#!/usr/bin/env python
"""
The MIT License (MIT)
Copyright (c) 2015 Maker Musings
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 restriction, including without limitation the rights
#https://www.python.org/ftp/python/3.3.0/python-3.3.0.msi
#http://pycurl.sourceforge.net/download/pycurl-7.19.5.1.win32-py3.3.exe
import pycurl
from io import BytesIO
import json
buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, 'https://hooks.slack.com/services/XXXXXXXX')
post_data = {"text": "This is a line of text in a channel.\nAnd this is another line of text."}
postfields = json.dumps(post_data)
@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;
@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: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)
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);

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:

<!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>