This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import subprocess | |
SOURCES = [ | |
('npth', 'npth-1.5'), | |
('ntbtls', 'ntbtls-0.1.2'), | |
('libgpg-error', 'libgpg-error-1.27'), | |
('libassuan', 'libassuan-2.5.1'), | |
('libgcrypt', 'libgcrypt-1.8.2'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// some of this was adapted from https://gist.github.com/eliquious/9e96017f47d9bd43cdf9 | |
func (sg SecretGenerator) GetPGPKey(passphrase string) string { | |
var config packet.Config | |
config.Time = func() time.Time { | |
return time.Date(2017, 1, 1, 0, 0, 0, 0, time.UTC) | |
} | |
uid := packet.NewUserId(sg.GetFriendlyName("main"), "", "") | |
if uid == nil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks https://lists.gnupg.org/pipermail/gnupg-users/2016-May/055985.html | |
# | |
# To specify the passphrase on the command line: | |
# | |
# gpg --pinentry-mode loopback --passphrase "secret" --batch --generate-key x25519-gen.gpgbatch | |
%echo Generating ed25519 primary and cv25519 subkey | |
Key-Type: eddsa | |
Key-Curve: Ed25519 | |
Key-Usage: sign |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/cabo/stlink | |
# https://blog.danman.eu/2-usb-crypto-token-for-use-with-gpg-and-ssh/ | |
sudo ./upgrade_by_passwd.py -f ../regnual/regnual.bin ../src/build/gnuk-vidpid.bin | |
sudo st-flash erase && st-flash --reset write ~/src/gnuk/src/build/gnuk-vidpid.bin 0x08000000 | |
-- or -- | |
~/src/stlink/build/Debug/st-flash reset && \ | |
~/src/stlink/build/Debug/st-flash erase && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <WEMOS_SHT3X.h> | |
#include "Adafruit_MQTT.h" | |
#include "Adafruit_MQTT_Client.h" | |
/************************* WiFi Access Point *********************************/ | |
#define WLAN_SSID "my-ssid" | |
#define WLAN_PASS "my-wifi-password" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, go get the stock firmware from the [TP-Link site](https://static.tp-link.com/2018/201803/20180316/Archer%20C9(US)_V3_171215.zip). | |
# Then unzip it and cd into the resulting directory. | |
$ ls -l | |
total 14956 | |
-rw-r--r-- 1 miket miket 14820016 Dec 15 2017 c9v4_eu-us-ca_up_1-3-1-20171215rel35219.bin | |
-rw-r--r-- 1 miket miket 112046 Sep 14 2015 'GPL License Terms.pdf' | |
-rw-r--r-- 1 miket miket 373590 Oct 14 2016 'How to upgrade TP-LINK Wireless AC Router.pdf' | |
$ binwalk c9v4_eu-us-ca_up_1-3-1-20171215rel35219.bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import binascii | |
from bluepy import btle | |
from bluepy.btle import DefaultDelegate | |
class MyDelegate(btle.DefaultDelegate): | |
def __init__(self, params): | |
btle.DefaultDelegate.__init__(self) | |
def handleNotification(self, cHandle, data): | |
print "SOMETHING HAPPENED %s" % (binascii.hexlify(data)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <BLEAddress.h> | |
#include <BLEDevice.h> | |
#include <BLEUtils.h> | |
#include <BLEScan.h> | |
#include <BLEAdvertisedDevice.h> | |
#include <U8x8lib.h> | |
int scanTime = 15; | |
// https://thejeshgn.com/2017/06/20/reverse-engineering-itag-bluetooth-low-energy-button/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mostly copied from http://randomnerdtutorials.com | |
// New stuff is the on/off logic | |
#include <ESP8266WiFi.h> | |
const char* ssid = "..."; | |
const char* password = "..."; | |
const char* resource_on = "/trigger/[IFTTT_APPLET_ID_TO_TURN_ON]/with/key/xxxxxxx"; | |
const char* resource_off = "/trigger/[IFTTT_APPLET_ID_TO_TURN_OFF]/with/key/xxxxxxx"; | |
const char* server = "maker.ifttt.com"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Planck", | |
"author": "http://www.keyboard-layout-editor.com/#/gists/0ab43ed5647a133cc5b0415ba9e02665" | |
}, | |
[ | |
{ | |
"a": 7 | |
}, | |
"Tab", |