Skip to content

Instantly share code, notes, and snippets.

View jackhumbert's full-sized avatar

Jack Humbert jackhumbert

View GitHub Profile
@gartenfeld
gartenfeld / syllable_frequency.txt
Created June 16, 2016 19:24
Frequency of Syllables in English
ðə 23038047
ə 18735224
ˈtu 12418461
ˈænd 11260533
ˈʌv 10968008
ɪn 10738928
li 5689929
ˈðæt 5416929
ˈaɪ 4683241
ˈfɔr 4678692
@gbaman
gbaman / HowToOTG.md
Last active May 9, 2025 20:48
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@jasonm23
jasonm23 / Ristretto-Affogato.kbd.json
Last active February 22, 2023 22:59
Ristretto Affogato
[
{
"backcolor": "#000000",
"name": "Ristretto Affogato",
"author": "/u/instant_sunshine",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX1A-E1xx",
"plate": true
},
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP( /* Charlie workman */
ESC, Q, D, R, W, B, J, F, U, P, SCLN, BSLS,
LCTL, A, S, H, T, G, Y, N, E, O, I, BSPC,
LSFT, Z, X, M, C, V, K, L, COMM, DOT, SLSH, ENT,
RSFT, LALT, LGUI, RCTL, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT),
[1] = KEYMAP( /* Charlie RAISE */
TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP( /* qwerty */
ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,
FN6, A, S, D, F, G, H, J, K, L, SCLN, ENT,
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
LCTL, CAPS, LALT, QUOT, FN2, SPC, FN1, SLSH, DEL, PSCR, TAB),
[1] = KEYMAP( /* dvorak */
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Classic
http://www.keyboard-layout-editor.com/#/layouts/46aa7b0762cb7a535eaaf1e49644398f
*/
/* 0: main layer */
/* XXX Not sure about what goes in the top left and bottom left position: placing ESC and RSFT there for now. */
KEYMAP( ESC, Q, W, E, R, T, Y, U, I, O, P, TAB, \
LCTL, A, S, D, F, G, H, J, K, L, SCLN, BSPC, \
@jaredhirsch
jaredhirsch / gist:5638a2f70a145374fbf1
Last active September 26, 2015 19:43
Closing IRC when your computer goes to sleep

TL;DR:

My problem: I need to close a program before my mac goes to sleep, but sometimes I forget.

My solution: use SleepWatcher to run an AppleScript that tells the app to quit. It's pretty technical.


I use IRC for work. Some people leave it open all the time; I prefer to use it as "office hours", and only have it open when I'm working and more-or-less interruptible.

@willprice
willprice / .travis.yml
Last active June 15, 2024 04:29
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@aras-p
aras-p / preprocessor_fun.h
Last active May 16, 2025 11:21
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@manmal
manmal / UIImageView+AFNetworkingFadeInAdditions.h
Last active August 27, 2017 17:31
Very minimalistic fade-in implementation for AFNetworking's UIImageView category. Thanks to @myellow and @merowing_.
#import <AFNetworking.h>
@interface UIImageView (AFNetworkingFadeInAdditions)
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage fadeInWithDuration:(CGFloat)duration;
@end