Skip to content

Instantly share code, notes, and snippets.

View Jeija's full-sized avatar

Florian Euchner Jeija

View GitHub Profile
@bjornvaktaren
bjornvaktaren / minimal_spi.cpp
Last active April 27, 2024 14:04
Simple SPI example with libftdi and FTDI UM232H
// Quite minimal example showing how to configure MPSSE for SPI using libftdi
// compile like this: g++ minimal_spi.cpp -o minimal_spi -lftdipp -lftdi
#include <ftdi.hpp>
#include <usb.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
// UM232H development module
#define VENDOR 0x0403
@morganrallen
morganrallen / esp32.md
Last active January 6, 2022 13:57
ESP32 hacking notes

Basic hookup

As I plan to make a custom breakout board I wanted to solder as few connections as possible. I was able to boot the device, with UART (out at least) soldering the following.

PIN NAME
0 GND
1 3V3
2 EN
@larsch
larsch / bootstrap-esp-open-sdk-arch.sh
Last active January 6, 2017 16:57
Bootstrap script for ESP8266 SDK on Arch Linux
#!/bin/sh -exu
sudo pacman -S --needed --noconfirm base-devel python2 expat ncurses gperf git wget unzip
sudo ln -sf /usr/bin/python2 /usr/bin/python
git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
cd esp-open-sdk
make STANDALONE=y
@schakko
schakko / glibberish-aes-256-cbc-decrypt.js
Created May 7, 2012 16:11
Using AES-256-CBC with OpenSSL, node.js and PHP
// Doing AES-256-CBC (salted) decryption with node.js.
// This code is based on http://php.net/manual/de/function.openssl-decrypt.php and works with PHP sqAES.
//
// Create your encrypted data with
// echo -n 'Hello world' | openssl aes-256-cbc -a -e
var crypto = require('crypto');
var password = 'password';
var edata = 'U2FsdGVkX18M7K+pELP06c4d5gz7kLM1CcqJBbubW/Q=';
@grugq
grugq / sshclient.py
Created December 6, 2011 02:58
twisted ssh client (based on conch.py) with an embedded cmd.Cmd shell for controllng the SSH session
from twisted.internet import reactor, defer, endpoints, task, stdio
from twisted.conch.client import default, options, direct
from twisted.conch.error import ConchError
from twisted.conch.ssh import session, forwarding, channel
from twisted.conch.ssh import connection, common
from twisted.python import log, usage
import signal
import tty
import struct
import fcntl