Skip to content

Instantly share code, notes, and snippets.

<html>
<body>
<form method="get" action="https://www.whatismyreferer.com/">
<button type="submit"></button>
</body>
</html>
(gdb) target extended-remote /dev/cu.usbmodemC1E2B7EE1
Remote debugging using /dev/cu.usbmodemC1E2B7EE1
(gdb) monitor swdp_scan
Target voltage: 3.3V
Available Targets:
No. Att Driver
1 ARM Cortex-M
(gdb) attach 1
@kirberich
kirberich / emoji_check.py
Created May 16, 2017 19:03
Check if string is a single emoji
"""Check if a string is a single emoji.
Surely there must be a library that does this already, but I couldn't find one.
If you know one, let me know so I can delete this and never speak of it again.
"""
import emoji
# Some of the more complicated emoji are stored with spaces in the emoji library
FIXED_UNICODE_EMOJI = {
import github3
# example code:
github = Github(
token='token',
repo_name='some_repo',
)
github.stage('articles/some_article.md', 'This is some new content')
github.publish('commit message')
const uint16_t pool_colors[ ] = {
matrix.Color(0, 0, 0),
matrix.Color(255, 255, 255),
matrix.Color(0, 140, 70),
matrix.Color(254, 239, 57),
matrix.Color(23, 73, 143),
matrix.Color(238, 54, 36)
};
const byte pool_animation[ ][8][8] = {
@kirberich
kirberich / ledstrip.ino
Last active January 4, 2016 01:49
Arduino RGB LED strip test sketch
// Red on 5, green on 6, blue on 9
byte rgb_pins[ ] = {5, 6, 9};
byte white_calibration[ ] = {255, 128, 64};
void set_color(float rp, float gp, float bp) {
analogWrite(rgb_pins[0], floor(rp*white_calibration[0]));
analogWrite(rgb_pins[1], floor(gp*white_calibration[1]));
analogWrite(rgb_pins[2], floor(bp*white_calibration[2]));
}
void setup() {
// Change timer 1 to fast PWM