Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am wybiral on github.
  • I am davywtf (https://keybase.io/davywtf) on keybase.
  • I have a public key whose fingerprint is D41D 42D1 F652 3ED3 EF5A CE8D 91A2 22E9 E3D9 0405

To claim this, I am signing this object:

@wybiral
wybiral / crash.go
Last active February 22, 2018 16:24
crash
// The basic strategy is to send an endless number of iframes with data URIs
// This causes a flood of download modals that crashes most desktop clients
//
// Currently running demo at: https://fan-pages.herokuapp.com
//
// NOTE: This server has received more traffic than expected so sometimes it
// doesn't serve the HTML fast enough. For the full effect run this Go server
// on a dedicated machine somewhere.
//
// PS: Save your work before you open it ;)
@wybiral
wybiral / tor-ed25519.go
Last active July 3, 2022 18:44
Example of generating Tor onions using the new ED25519-v3 format
// Example of generating Tor onion using the new ED25519-v3 format
package main
import (
"crypto/rand"
"crypto/sha512"
"encoding/base32"
"encoding/base64"
"fmt"
@wybiral
wybiral / hookah-example.go
Created June 27, 2018 14:23
Real-time processing of CertStream API using hookah
package main
import (
"encoding/json"
"io"
"log"
"github.com/wybiral/hookah"
)
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
}
void loop() {
byte b;
if (Serial1.available() > 0) {
b = Serial1.read();
Serial.write(b);
google-chrome "https://google.com"
#include <BLEAdvertisedDevice.h>
#include <BLEDevice.h>
#include <BLEScan.h>
const int PIN = 2;
const int CUTOFF = -60;
void setup() {
pinMode(PIN, OUTPUT);
BLEDevice::init("");
import pycom
import socket
pycom.heartbeat(False)
html = b'''<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Change Color</title>
@wybiral
wybiral / EspruinoWebSockets.js
Last active February 5, 2022 22:57
Example of using WebSockets on an Espruino WiFi device for bidirectional communication.
/*
Example of using WebSockets on an Espruino WiFi device for bidirectional communication.
Fill in the WiFi SSID and password to connect to your local network and then the Espruino
console will print out the IP address of your device which you can connect to with a web
browser.
Video here: https://www.youtube.com/watch?v=xcecEODjxSE
*/
@wybiral
wybiral / LoraDemo.js
Created October 11, 2018 23:38
This is an example of using Espruino JS to control a REYAX LoRa module.
/*
This is an example of using Espruino JS to control a REYAX LoRa module.
It listens for "on" and "off" messages to change and LED and
sends "on" and "off" messages by pressing the button.
Watch the video here: https://youtu.be/IStuUv9eAmE
*/
const RYLR = require('https://github.com/wybiral/espruino-modules/blob/master/RYLR.js');