This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<form method="get" action="https://www.whatismyreferer.com/"> | |
<button type="submit"></button> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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 = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |