Skip to content

Instantly share code, notes, and snippets.

View wsh32's full-sized avatar

Wesley Soo-Hoo wsh32

View GitHub Profile
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
@wsh32
wsh32 / rename_branch.md
Created June 29, 2020 05:03
Renaming git branches

Renaming Git Branches

See this tweet.

This guide will describe how to rename your git master branch to main.

  1. Update local repository
git pull upstream main
@wsh32
wsh32 / pkglist-aur.txt
Created December 30, 2019 05:42
pkglists
acroread
catt
clion
colorpicker
digikey-kicad-library-git
digilent.waveforms
figma-bin
gnome-shell-extension-drop-down-terminal
gnome-shell-extension-manjaro-update
ignition-cmake-0
@wsh32
wsh32 / .gitrepos
Last active December 20, 2019 16:59
Yoctoboard clone repos
git@github.com:wsh32/yoctoboard-agent.git
git@github.com:wsh32/yoctoboard-cad.git
git@github.com:wsh32/yoctoboard-electronics.git
git@github.com:wsh32/yoctoboard-firmware.git
@wsh32
wsh32 / git-transfer.md
Last active September 17, 2019 21:09
Notes on setting up a source code transfer system using git

Git Transfer System

This test is to transfer files from a development computer to the onboard NUC without needing an internet connection.

Set up git repo

# On the NUC
mkdir /home/kubo/dev/gravl_test
cd /home/kubo/dev/gravl_test
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 5
#define NUMPIXELS 1
Adafruit_NeoPixel led = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
@wsh32
wsh32 / vimrc
Last active February 9, 2019 17:38
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@wsh32
wsh32 / boards.txt
Created September 20, 2017 18:32
Arduino Board Tag reference for arduino-mk
uno.name=Arduino Uno
atmega328.name=Arduino Duemilanove w/ ATmega328
diecimila.name=Arduino Diecimila or Duemilanove w/ ATmega168
nano328.name=Arduino Nano w/ ATmega328
nano.name=Arduino Nano w/ ATmega168
mega2560.name=Arduino Mega 2560 or Mega ADK
mega.name=Arduino Mega (ATmega1280)
leonardo.name=Arduino Leonardo
esplora.name=Arduino Esplora
micro.name=Arduino Micro
@wsh32
wsh32 / magic.py
Created June 13, 2017 05:21
Merges a burst of shots into a slow shutter looking image
from PIL import Image
from os import listdir
from os.path import join
__author__ = "Wesley Soo-Hoo"
__license__ = "MIT"
input_dir = 'input/'
output_file = 'output.png'
@wsh32
wsh32 / main.py
Last active January 6, 2017 09:11
FFScout
import time, math, threading
from tba import *
"""main.py: It's all magic"""
class PriorEvent:
def __init__(self, event_code, ranking, chairmans, outcome):
self.event = event_code
self.ranking = ranking