Skip to content

Instantly share code, notes, and snippets.

View jacobrosenthal's full-sized avatar

Jacob Rosenthal jacobrosenthal

View GitHub Profile
@jacobrosenthal
jacobrosenthal / b7ed3fd.diff
Created January 20, 2020 06:39
vs 430a83f.diff
diff --git a/his b/his-mine2
index a73f9f4..933e6db 100644
--- a/his
+++ b/his-mine2
@@ -32,14 +32,14 @@ UsbBus::reset
USB_OTHER
ep 0 GOT SETUP
-UsbBus::read 8 bytes from ep EndpointAddress(0) -> [0, 5, 31, 0, 0, 0, 0, 0]
+UsbBus::read 8 bytes from ep EndpointAddress(0) -> [0, 5, 29, 0, 0, 0, 0, 0]
diff --git a/upstream b/his
index da9773a..a73f9f4 100644
--- a/upstream
+++ b/his
@@ -1,4 +1,5 @@
+
******** UsbBus::new
UsbBus::alloc_ep dir=In addr=None type=Interrupt max_packet_size=8 interval=255
diff --git a/upstream b/his
index 014cd90..5d7a54c 100644
--- a/upstream
+++ b/his
@@ -23,32 +23,22 @@ alloc_ep -> EndpointAddress(128)
UsbBus::enable
-USB_OTHER
-PollResult::Suspend
@jacobrosenthal
jacobrosenthal / lighthouse_aarch64.txt
Created December 8, 2019 10:02
lighthouse aarch64
Compiling leveldb v0.8.4
error[E0308]: mismatched types
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/leveldb-0.8.4/src/database/mod.rs:112:35
|
112 | ... c_string.as_bytes_with_nul().as_ptr() as *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8
|
= note: expected type `*const u8`
found type `*const i8`
use std::thread;
use std::time::{Duration, Instant};
use std::fs;
use std::io;
use std::io::BufRead;
static DB_PATH: &str = "./file.db";
struct Row {
#!/usr/bin/env bash
# ideally in the future this script is deprecated for a cargo tools bin method
# https://matklad.github.io/2018/01/03/make-your-own-make.html
# but were waiting on the ability to run std build scripts in a no_std project
# https://github.com/rust-embedded/wg/issues/256#issuecomment-438483578
# alternatively you could attach a programmer like an stlink and use openocd here instead of dfu
# https://gist.github.com/todbot/6b8da4bed3545313ae976be6be7ffc40
From 727cffc1735597e950abdc605edf935b535466dc Mon Sep 17 00:00:00 2001
From: Jacob Rosenthal <jacobrosenthal@gmail.com>
Date: Mon, 30 Jul 2018 14:39:28 -0700
Subject: [PATCH] add s110 syscalls
---
libr/syscall/d/Makefile | 1 +
libr/syscall/d/meson.build | 1 +
libr/syscall/d/s110-arm-16.sdb.txt | 134 +++++++++++++++++++++++++++++++++++++
3 files changed, 136 insertions(+)
@jacobrosenthal
jacobrosenthal / generate_dat.py
Created July 29, 2018 23:00
old nrfutil dfu init packet manifest zip generation
#!/usr/bin/python
# genereate .dat and .zip for an application binary
# todo, take softdevice and bootloaders and do whatever alterations to the hex necesary
# https://github.com/NordicSemiconductor/nRF-Master-Control-Panel/blob/master/init%20packet%20handling/How%20to%20generate%20the%20INIT%20file%20for%20DFU.pdf
# code shamelessly stolen from https://devzone.nordicsemi.com/question/22586/anyone-do-successfully-dfu-ota-for-sdk701-softdevice-s110-v710/
import argparse, sys, zipfile, glob, os
// https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup
// note, twitter is super stingy and this code requires multiple api requests by default
// ie you can run this script only a few times before youll get api limited for another 15 minutes
var Twitter = require('twitter-lite');
var client = new Twitter({
consumer_key: process.env.TWITTER_CONSUMER_KEY,
consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
access_token_key: process.env.TWITTER_ACCESS_TOKEN_KEY,
// https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-home_timeline.html
// note, twitter is super stingy and this code requires like 5 api requests by default, ie 1/3 of your 15 min max
// ie you can run this script as many as 3 times before youll get api limited for another 15 minutes
var Twitter = require('twitter-lite');
var client = new Twitter({
consumer_key: process.env.TWITTER_CONSUMER_KEY,
consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
access_token_key: process.env.TWITTER_ACCESS_TOKEN_KEY,
access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET