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
#include "stm32f10x.h" | |
void Delay_us(uint32_t xus) { | |
SysTick->LOAD = 72 * xus; | |
SysTick->VAL = 0x00; | |
SysTick->CTRL = 0x00000005; | |
while(!(SysTick->CTRL & 0x00010000)); | |
SysTick->CTRL = 0x00000004; | |
} |
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
Ctrl+o script-message-to dialog open #menu: Open > Files... | |
Ctrl+O script-message-to dialog open-folder #menu: Open > Folder... | |
_ script-message-to dialog open append #menu: Open > Add To Playlist... | |
_ ignore #menu: Open > - | |
_ script-message-to dialog open bd-iso #menu: Open > Bluray ISO... | |
_ script-message-to dialog open dvd-iso #menu: Open > DVD ISO... | |
_ ignore #menu: Open > - | |
Ctrl+v script-message-to dialog open-clipboard #menu: Open > Clipboard | |
_ ignore #menu: Open > - | |
Ctrl+R script-binding recentmenu/open #menu: Open > Recently Played #@recent |
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 time | |
import board | |
import busio | |
import displayio | |
import terminalio | |
from adafruit_display_text import label | |
from adafruit_display_shapes.rect import Rect | |
from adafruit_display_shapes.circle import Circle | |
from adafruit_display_shapes.roundrect import RoundRect | |
from adafruit_display_shapes.triangle import Triangle |
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
:H,ST7735,128,160,16,SPI,1,7,2,3,6,11,10,*,27 | |
:S,1,1,1,0,10,10 | |
:I | |
EF,3,03,80,02 | |
CF,3,00,C1,30 | |
ED,4,64,03,12,81 | |
E8,3,85,00,78 | |
CB,5,39,2C,00,34,02 | |
F7,1,20 | |
EA,2,00,00 |
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
; Board Spec: https://wiki.luatos.com/chips/esp32c3/board.html | |
[env:esp32-c3-devkitm-1] | |
platform = espressif32 | |
board = esp32-c3-devkitm-1 | |
framework = arduino | |
board_build.flash_mode = dio | |
board_build.extra_flags = | |
-DARDUINO_ESP32C3_DEV | |
-DARDUINO_USB_MODE=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
REPO="OWNER/REPO" | |
TOKEN="TOKEN" | |
for id in $(curl -s \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token ${TOKEN}" \ | |
https://api.github.com/repos/${REPO}/actions/caches | jq -r '.actions_caches[] | .id'); do | |
echo "Deleting cache with id: $id..." | |
curl -X DELETE \ | |
-H "Accept: application/vnd.github.v3+json" \ |
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
#!/bin/bash | |
set -eo pipefail | |
SRC_REPO="" | |
TARGET_REPO="" | |
RANGE="" | |
# generate patches | |
patch_gen() { |
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
# A simple example. See reference.yml for explanation for explanation of all options. | |
# | |
# auth: | |
# token: | |
# realm: "http://127.0.0.1:5001/auth" | |
# service: "Docker registry" | |
# issuer: "Acme auth server" | |
# rootcertbundle: "/path/to/server.pem" | |
# | |
# openssl req -newkey rsa:2048 -nodes -keyout server.key -x509 -days 365 -out server.crt |
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
#!/bin/bash | |
# | |
# Bash script to setup headless Selenium (uses Xvfb and Chrome) | |
# (Tested on Ubuntu 12.04) trying on ubuntu server 14.04 | |
# Add Google Chrome's repo to sources.list | |
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
# Install Google's public key used for signing packages (e.g. Chrome) | |
# (Source: http://www.google.com/linuxrepositories/) |
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
# vim style tmux config | |
# use C-a, since it's on the home row and easier to hit than C-b | |
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
# Easy config reload | |
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." |