Skip to content

Instantly share code, notes, and snippets.

View MitchRatquest's full-sized avatar

Mitchell Dokken MitchRatquest

View GitHub Profile
@MitchRatquest
MitchRatquest / sun8i-h3-nanopi-neo.dts
Last active May 25, 2017 15:15
eth0+usb enabled nanopi neo buildroot dtb
/dts-v1/;
/ {
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <0x1>;
model = "Xunlong Orange Pi One";
compatible = "xunlong,orangepi-one", "allwinner,sun8i-h3";
chosen {
@MitchRatquest
MitchRatquest / nanopi-neo 4.10.1
Last active May 25, 2017 23:53
*WIP* buildroot nanopi neo working Linux nanopi-neo 4.10.1 #1 SMP Tue May 23 12:44:00 CDT 2017 armv7l GNU/Linux
#!/bin/bash
VERSION=2017.05-rc2
wget https://git.busybox.net/buildroot/snapshot/buildroot-"$VERSION".tar.gz
tar zvxf buildroot-"$VERSION".tar.gz
mkdir patches
cd patches
@MitchRatquest
MitchRatquest / burnimg.sh
Last active September 6, 2017 10:43
Alpine Linux Install Script for Allwinner H3 single board computers
#!/bin/bash
#this script grabs dependencies for the armhf alpine image for H3 allwinner chips
#you will need to modify your script.bin with the fex files and sunxi-tools
#use fex2bin to modify and create and place it in the H3-Distro directory
#TODO: check dependencies for dosfstools sunxi-tools
echo "run this script with your sd card as the argument"
echo "if unsure, check with: ls /dev/sd*"
echo "use only the last part, like: ./burnimg.sh sdh"
@MitchRatquest
MitchRatquest / quickAP.sh
Last active May 13, 2019 11:09
install dhcp server and wifi ap on orangepi board
#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
@MitchRatquest
MitchRatquest / vnc.sh
Last active July 15, 2021 23:04
no nonsense noVNC
#!/bin/bash
#added kill function
#run as:
#./SCRIPTNAME.sh k
#to kill these spawned processes
#
#if you want to to be able to position your windows interactively:
#sudo apt-get -y install blackbox
#add this to the end of runvnc()
#blackbox -display :1 >/dev/null &>/devnull &
@MitchRatquest
MitchRatquest / get_luakit.sh
Created February 3, 2017 19:19
install luakit armhf
#!/bin/bash
wget http://launchpadlibrarian.net/218139665/luakit_2012.09.13-r1-8_armhf.deb
sudo dpkg -i luakit_2012.09.13-r1-8_armhf.deb
sudo apt-get -f install -y #you'll need roughly 32mb free space
@MitchRatquest
MitchRatquest / rawinput.py
Created September 12, 2016 19:26
generic scanner
import os, datetime, time
yam = [] #init var
timestamp = str(datetime.datetime.now().strftime('%I.%M.%S_%p')) + '.txt' #only once, filename ultimately
daystamp = datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d') #name of folder to put files for today in
cwd = os.getcwd() #current working directory
opj = os.path.join #more magic - OS PATH JOIN = opj, for windows and linux compatibility
folderWithTodaysDate = opj(cwd, daystamp) # folder to place all todays scans in
@MitchRatquest
MitchRatquest / LTC1257.ino
Created September 9, 2016 03:18
LTC1257 untested quick code
/*
shift register simpletown for LTC1257
12 bit DAC, 5V, 1.4MHz max clock
DIN, CLK, !LOAD
________
CLK - - VCC
DIN - - VOUT
!LOAD - - REF
DOUT -________- GND
sudo cpufreq-set -g performance
wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/7916060/+files/chromium-browser_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb
wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/7916060/+files/chromium-chromedriver_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb
wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/7916060/+files/chromium-codecs-ffmpeg_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb
sudo dpkg -i chromium-browser_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb chromium-chromedriver_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb chromium-codecs-ffmpeg_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb
sudo apt-get -f install -y
sudo apt-get install dbus-x11 xauth -y #might be unnecessary
chromium-browser --noerrordialogs --disable-session-crashed-bubble
#!/bin/sh
#wget -O NOR http://www.northofreality.com/tales/2016/7/4/the-inner-hologram 2>/dev/null && grep 'blog-item-content ' NOR | sed 's/<\/p>/\n/g' | sed 's/<p>/\n/g'| sed 's/<div class=\"blog.*div class=\"sqs-block-content">//g'| sed 's/<\/div><\/div>.*//g' | sed 's/\.\&nbsp;/\./g'
#used to practice sed
#load front page, grab newest story
newest=$( wget -O NOR http://www.northofreality.com/ 2>/dev/null && grep '\/tales\/[0-9]\{4\}\/[0-9]*\/[0-9]*\/[^#]*' NOR -m 1 | sed 's/<a href="//g' | sed 's/#.*//g' | sed 's/ //g')
#grab newest story and format for terminal
wget -O NOR http://www.northofreality.com$newest 2>/dev/null && grep 'blog-item-content ' NOR | sed 's/<\/p>/\n/g' | sed 's/<p>/\n/g'| sed 's/<div class=\"blog.*div class=\"sqs-block-content">//g'| sed 's/<\/div><\/div>.*//g' | sed 's/\.\&nbsp;/\./g'