Skip to content

Instantly share code, notes, and snippets.

View billglover's full-sized avatar
🎶
tap tap tapping tanzu tapping

Bill Glover billglover

🎶
tap tap tapping tanzu tapping
View GitHub Profile
@billglover
billglover / package.json
Created May 19, 2013 15:43
Basic package.json for Node.js application.
{
"name": "",
"preferGlobal": false,
"version": "0.0.1",
"author": "Bill Glover <bill@billglover.co.uk>",
"description": "",
"contributors": [
{
"name": "Bill Glover",
"email": "bill@billglover.co.uk"
@billglover
billglover / screen.sh
Created May 20, 2013 19:40
For some reason VirtualBox and Guest Additions don't pick up the screen size on my laptop. These commands give me a full screen view.
#!/bin/bash
xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
xrandr --addmode VBOX0 1368x768_60.00
export EDITOR=vim
GREEN="\[\e[0;32m\]"
BLUE="\[\e[0;34m\]"
RED="\[\e[0;31m\]"
YELLOW="\[\e[0;33m\]"
COLOREND="\[\e[00m\]"
# Aliases
alias c='clear'
@billglover
billglover / defisheye.sh
Created May 13, 2015 05:28
De-Fisheye GoPro images
mogrify -path ./output -distort barrel '0.06335 -0.18432 -0.10618' ./*.JPG
@billglover
billglover / image2mp4.sh
Created May 13, 2015 05:31
Encode a folder of images as MP4 video
ffmpeg -pattern_type glob -framerate 30 -i '*.JPG' -s:v 1920x1080 -profile:v high -crf 18 -pix_fmt yuv420p -r 30 -movflags faststart -bf 2 -g 15 -shortest youtube.mp4
@billglover
billglover / chinesepod_oauth.txt
Created May 13, 2015 05:35
Sequence of oAuth calls to authenticate with the ChinesePod API
http://chinesepod.com/oauth/request_token
http://chinesepod.com/oauth/authorize?oauth_token=1cd233ac7212009a199be7e7b25a605a
http://chinesepod.com/oauth/authorize/1cd233ac7212009a199be7e7b25a605a
http://chinesepod.com/oauth/authorize/1cd233ac7212009a199be7e7b25a605a/1
http://chinesepod.com/oauth/access_token
@billglover
billglover / chinesepod_api.txt
Created May 13, 2015 05:37
Known ChinesePod API methods
http://chinesepod.com/api/course/getUserCourses?count=10&page=0&lastitem=0&format=json
http://chinesepod.com/api/lesson/getUserLessons?status=active&service=lesson&count=20&page=0&lastitem=0&format=json
http://chinesepod.com/api/lesson/getLesson?format=json&id=1796
http://chinesepod.com/api/lesson/getLesson?format=json&id=1794
http://chinesepod.com/api/tool/getFlashcard?format=json&count=100000
http://chinesepod.com/api/user/logout-for-iphone?a_token=4f405fd2cb805e09898066d056419cf2
@billglover
billglover / MediaKeys.ahk
Last active August 29, 2015 14:21
Provide media key functionality by using the navigation keys using #AutoHotKey
#NoEnv
#SingleInstance, force
SendMode Input
SetWorkingDir %A_ScriptDir%
; Ctrl + Alt + Left = previous track
^!Left::Media_Prev
; Ctrl + Alt + Right = next track
^!Right::Media_Next
@billglover
billglover / ReverseScroll.ahk
Last active January 9, 2023 00:01
Reverse the scroll wheel script for #AutoHotKey
#SingleInstance, force
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#MaxHotkeysPerInterval 350
WheelUp::
Send {WheelDown}
Return
@billglover
billglover / ApplicationShortcuts.ahk
Last active August 29, 2015 14:21
Collection of application short cuts for #AutoHotKey
#NoEnv
#SingleInstance, force
SendMode Input
SetWorkingDir %A_ScriptDir%
; AppsKey + v - paste plain text
AppsKey & v::
TempText := ClipBoard
If (TempText != "")
PutText(ClipBoard)