Skip to content

Instantly share code, notes, and snippets.

@openube
openube / mopidy.conf
Created January 4, 2021 11:21 — forked from mrpjevans/mopidy.conf
Sample mopidy.conf file for MagPi tutorials
[http]
# Make sure the web interface can be accessed by the local network
hostname = 0.0.0.0
[audio]
# Direct audio to the DAC, not HDMI
output = alsasink
# The File extension isn't of much use, so we can disable it
[file]
@openube
openube / Windows 10 Optimization Script.ps1
Created April 4, 2020 14:17
Windows 10 Optimization Script
##########
# Win10 Optimization Script With Extra GPD Win Tweaks
# Adapted version of https://github.com/Disassembler0/Win10-Initial-Setup-Script by Disassembler <[email protected]>
# Author: BlackDragonBE
# Version: v2.2.1 (2017-12-02)
# Copied from https://www.reddit.com/r/gpdwin/comments/6ipa6c/windows_10_optimization_script_for_gpd_win/
##########
# As a workaround for disabled script execution, run this command (without #) in an elevated PowerShell windows first and choose "all" if you're asked where to apply this:
# Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
@openube
openube / install_exfat.sh
Created July 9, 2018 11:49 — forked from UedaTakeyuki/install_exfat.sh
Install exfat on Raspberry Pi
# reference: http://www.limemo.net/blog/2013/12/ラズベリーパイを使ってみる-windows-vista以降で使えるフ.html
sudo apt-get install exfat-fuse exfat-utils
# format
#mkfs.exfat /dev/(デバイス名)
# mount
# sudo mount -t exfat /dev/(デバイス名) /mnt/hoge
@openube
openube / build-gcc.sh
Created February 26, 2018 17:17 — forked from jeetsukumaran/build-gcc.sh
Build and Install GCC Suite from Scratch
#! /bin/bash
GCC_VERSION="5.2.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"
## NOTE: XCode must be installed (through App Store) and the following run to install command-line tools.
## THIS IS IMPORTANT! Among other things, it creates '/usr/include' and installs the system header files.
# xcode-select --install
@openube
openube / Console Capture
Created September 4, 2017 00:19 — forked from taitems/Console Capture
Prevent console.log()s from causing JS errors
if (!window.console) {
window.console = {};
window.console.log = function() {
return false;
};
}
@openube
openube / plate-snitch.js
Created September 4, 2017 00:18 — forked from taitems/plate-snitch.js
(Extract) Check the status of a vehicle registration and scrape results.
// Open form and submit enquire for `rego`
function getInfo(rego) {
horseman
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
.open(url)
.type('#registration-number-ctrl input[type=text]', rego)
.click('.btn-holder input')
.waitForSelector('.ctrl-holder.ctrl-readonly')
.html()
.then(function(body) {
@openube
openube / plate-snitch.js
Created September 4, 2017 00:17 — forked from taitems/plate-snitch.js
Image processing to identify license plate
openalpr.IdentifyLicense(imagePath, function (error, output) {
// handle result
});
@openube
openube / raspberry-pi-vpn-router.md
Created August 13, 2017 16:26 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@openube
openube / 01 bluetooth webapp
Created April 29, 2017 19:11 — forked from Cinezaster/01 bluetooth webapp
Node.js Bluetooth integrated web-app
This a bluetooth web-app.
@openube
openube / _hover_example.py
Created December 6, 2016 20:11 — forked from dankrause/_hover_example.py
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)