Skip to content

Instantly share code, notes, and snippets.

View konsumer's full-sized avatar

David Konsumer konsumer

View GitHub Profile
@konsumer
konsumer / cloudSettings
Last active January 28, 2021 08:01
VSCode Settings - Use https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync to keep settings & extensions in sync
{"lastUpload":"2021-01-28T08:01:44.280Z","extensionVersion":"v3.4.3"}
-- Wideband FM broadcast radio receiver for luajit & love
-- modified from here https://luaradio.io/examples/rtlsdr-wbfm-stereo.html
-- run with
-- luajit main.lua
-- or
-- love .
local radio = require('radio')
local function playFM(frequency)
@konsumer
konsumer / openurl.js
Created July 9, 2020 19:17
frida script to open a URL on ios
function openURL(url) {
const UIApplication = ObjC.classes.UIApplication.sharedApplication()
const toOpen = ObjC.classes.NSURL.URLWithString_(url)
return UIApplication.openURL_(toOpen)
}
openURL("https://google.com/search?q=cool")
@konsumer
konsumer / 0_create_image.sh
Last active July 8, 2020 23:48
This is a basic system to modify a pi image & boot it in an emulator. Only docker is required. Instead of docker, you could also use chroot in create_image script. I like using qemu (in docker) so I can really test if the image will work. It constrains memory and runs slower. A chroot is much faster, but less similar to a real pi.
#!/bin/bash
IMG_FILE="${PWD}/yours-buster.img"
if [ ! -f "2020-05-27-raspios-buster-lite-armhf-firstboot.zip" ]; then
echo "Downloading disk image."
curl -OL https://github.com/meeDamian/raspios/releases/download/2020-05-27/2020-05-27-raspios-buster-lite-armhf-firstboot.zip || (
echo "Unable to extract."
exit 1
)
@konsumer
konsumer / personal_data_security.md
Last active June 15, 2020 05:21
Quick overview of some techniques to ensure your personal data is secured. I happily will accept suggestions, if anyone can think of other things, and am also happy to explain or help with any part.

PERSONAL DATA SECURITY

Who Am I?

I'm a programmer with a personal interest in data-security. You can find me on github as konsumer.

Layers

Personal data-security is all about securing every layer, starting with the layers that enable other layers. Keep in mind the full path of things that are high-target items (money, devices - like apple/gmail, personal communication, social-networking) and keep in mind what each item allows access to. Do your best to secure every layer as well as you can, and quickly respond to indications of breach at every layer.

@konsumer
konsumer / gpc_midi2.ino
Created May 20, 2020 00:24
Gamecube controller (or DDR Mat) to USB MIDI. Install "Nintendo" and "MIDIUSB" in arduino library-manager. Use this on a programmable-USB arduino, like Leonardo.
#include "Nintendo.h"
#include "MIDIUSB.h"
// attach gamecube controller red wire on this digital pin
#define GC_PIN 7
// MIDI controls for each pad
int ctrls[6] = { 10, 11, 12, 13, 14, 15 };
// track previous state
// attach gamecube controller red wire on this digital pin
#define GC_PIN 7
#include "Nintendo.h"
CGamecubeController GamecubeController(GC_PIN);
// attach gates to these digital-out pins
// these also happen to be the PWM-able pins on the arduino nano
int pins[6] = { 3, 5, 6, 9, 10, 11 };
// attach red pin of GC connector here
#define GC_PIN 7
// attach your gate plugs to these pins
#define GATE1_PIN 1
#define GATE2_PIN 2
#define GATE3_PIN 3
#define GATE4_PIN 4
#include "Nintendo.h"
@konsumer
konsumer / gcpadcv.ino
Last active May 18, 2020 04:17
Gamecube controller (or DDR Mat) to CV. Install "Nintendo" in arduino library-manager. Attach a DAC to pin 5 for CV out (like this: https://create.arduino.cc/projecthub/Arduino_Scuola/build-a-simple-dac-for-your-arduino-4c00bd)
// attach your DAC to this pin
#define DAC_PIN 5
#include "Nintendo.h"
// Define a Gamecube Controller
CGamecubeController GamecubeController(7);
void setup() {
pinMode(DAC_PIN, OUTPUT);
@konsumer
konsumer / gcpadmidi.ino
Last active May 20, 2020 00:12
Gamecube controller (or DDR Mat) to USB MIDI. Install "Nintendo" and "MIDIUSB" in arduino library-manager. Use this on a programmable-USB arduino, like Leonardo.
#include "Nintendo.h"
#include "MIDIUSB.h"
// attach gamecube controller red wire on this digital pin
#define GC_PIN 7
// MIDI controls for each pad
int ctrls[6] = { 10, 11, 12, 13, 14, 15 };
CGamecubeController GamecubeController(GC_PIN);