Skip to content

Instantly share code, notes, and snippets.

View pastcompute's full-sized avatar
💯

Andrew pastcompute

💯
View GitHub Profile
@pastcompute
pastcompute / gist.md
Last active February 4, 2016 06:12
Notes on Rikki Endsleys documentation talk @ LCA2016
@pastcompute
pastcompute / gist.md
Last active February 5, 2016 01:09
Fuzzing talk Erik de Casto Lopo
@pastcompute
pastcompute / gist.md
Last active February 11, 2016 10:55
Microsoft Visual Studio 2015 for cross platform mobile development (irony of ironies)
@pastcompute
pastcompute / gist:d14e7e691cef69f05822
Created March 16, 2016 23:33
PHP google apps redirector
function doGet(e) {
// var params = JSON.stringify(e);
// Add a row to the spreadsheet here
var ss = SpreadsheetApp.openById(PropertiesService.getUserProperties().getProperty("ssId"));
var sheet = ss.getSheetByName("Beacons");
if (sheet == null) {
sheet = ss.insertSheet("Beacons");
}
@pastcompute
pastcompute / gist:195942dae6b6b97481dc
Created March 18, 2016 10:04
OpenWRT firewall tweaks
iptables -I OUTPUT -p icmp --icmp-type port-unreachable -d 8.8.8.8 -j DROP
iptables -I OUTPUT -p icmp --icmp-type port-unreachable -d 8.8.4.4 -j DROP
iptables -t mangle -D mssfix -o ge00 -p tcp -m tcp --tcp-flags SYN,RST SYN -m limit --limit 10/sec -m comment --comment "wan (mtu_fix logging)" -j LOG --log-prefix "MSSFIX(wan): "
iptables -N ACCOUNTING
iptables -I INPUT -i ge00 -j ACCOUNTING
iptables -I OUTPUT -o ge00 -j ACCOUNTING
iptables -I FORWARD -o ge00 -j ACCOUNTING
@pastcompute
pastcompute / blink.cpp
Last active March 25, 2016 00:01
Blink demo for Arduino
@pastcompute
pastcompute / hello.cpp
Last active March 25, 2016 13:49
Platformio serial hello world
#include "Arduino.h"
void setup()
{
Serial.begin(115200);
Serial.println("Hello, world");
}
void loop()
{
@pastcompute
pastcompute / Teensy_udev.rules
Last active March 26, 2016 00:01
Teensy UDEV rules
# UDEV Rules for Teensy boards, http://www.pjrc.com/teensy/
#
# The latest version of this file may be found at:
# http://www.pjrc.com/teensy/49-teensy.rules
#
# This file must be placed at:
#
# /etc/udev/rules.d/49-teensy.rules (preferred location)
# or
# /lib/udev/rules.d/49-teensy.rules (req'd on some broken systems)
@pastcompute
pastcompute / mqttsn.md
Last active March 26, 2016 00:24
Some MQTT-SN flows
             Client              Gateway               Broker
                |                   |                    |      
   PUBLISH() -->| --- SERCHGW ----> |                    |  
                | <-- GWINFO  ----- |                    |  
                | --- CONNECT ----> |                    |  
                | <--WILLTOPICREQ-- |                    |  
                | --- WILLTOPIC --> |                    |  
                | <-- WILLMSGREQ -- |                    |  

| --- WILLMSG ----> | ---- CONNECT ----> |(accepted)

@pastcompute
pastcompute / gcode.gs
Created April 6, 2016 02:26
Google sheets script get list of files in gdrive
function listFilesInFolder(id) {
var folder = DriveApp.getFolderById('MyFolderID');
var contents = folder.getFiles();
var file;
var name;
var sheet = SpreadsheetApp.getActiveSheet();
var date;
var size;
sheet.clear();