Skip to content

Instantly share code, notes, and snippets.

View chand1012's full-sized avatar

Chandler chand1012

View GitHub Profile
@chand1012
chand1012 / sfxCopy.py
Created November 18, 2017 06:07
A script to copy sound effects between Pico-8 Carts
# Created by Chandler Lofland aka chand1012
# Licensed as CC 3.0 US
# This script is to copy sfx between carts in pico8
# Uses basic file commands in python and sys for arguments
# For Python 3.0+
# arguments go like so: python sfxcpy.py <inputFile> <outputFile>
import sys
args = sys.argv
@chand1012
chand1012 / buttons.css
Last active December 21, 2017 18:21
Simple yet ellegant CSS buttons
//from https://codepen.io/simonbusborg/pen/cyxad
// converted from scss to css
:root {
--color-dark: #161616;
--color-ocean: #416dea;
--color-grass: #3dd28d;
--color-snow: #fff;
--color-salmon: #f32c52;
--color-sun: #feee7d;
@chand1012
chand1012 / temps.py
Created February 20, 2018 18:19
Get CPU and GPU temps from Windows with Python and OHM
import wmi
def avg(value_list):
num = 0
length = len(value_list)
for val in value_list:
num += val
return num/length
@chand1012
chand1012 / catalan.py
Created October 13, 2018 03:14
Catalan's constant calculator in python
# Simple Catalan's Constant implimentation in python
# Written for some homework, hope someone else finds it useful
# n being the times the number is calculated, increasing n increases accuracy
from fractions import Fraction
n = int(raw_input("enter N:"))
k = 1
sum = 0
sign = 1
while True:
@chand1012
chand1012 / AttinyMotor.ino
Last active March 18, 2019 18:53
uses an ATTiny85 to drive a L293D driver
//L293D
//Motor A
#define motorPin1 5 // Pin 14 of L293
#define motorPin2 2 // Pin 10 of L293
//Motor B
#define motorPin3 3 // Pin 7 of L293
#define motorPin4 4 // Pin 2 of L293
//ping sensor
#define echoPin 0
@chand1012
chand1012 / tweepydelete.py
Last active October 15, 2019 19:25
Deletes tweets
import tweepy
def login(key, secret):
auth = tweepy.OAuthHandler(key, secret)
auth_url = auth.get_authorization_url()
verify = input(f"Enter your verification code after authenticating here: {auth_url}\n~$: ")
auth.get_access_token(verify)
return tweepy.API(auth)
@echo off
title youtube-dl script
set /p url="Past url to download:"
youtube-dl %url%
pause
desktop:=1
<^<!b::
Run, cmd
return
<^<!t::
run, git-bash.exe
return
@chand1012
chand1012 / bblayers.conf
Created May 30, 2019 12:01
Raspberry Pi Bitbake config files
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/user/rpi/sources/poky/meta \
/home/user/rpi/sources/poky/meta-poky \
@chand1012
chand1012 / bblayers.conf
Last active May 30, 2019 20:02
Intel x86 Bitbake files
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/user/yoctox86/sources/poky/meta \
/home/user/yoctox86/sources/poky/meta-poky \