Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Ray Chen <oldsharp@gmail.com>
# License: Public domain
import sys
Initial commit
@oldsharp
oldsharp / proxy
Last active September 11, 2016 13:04
proxy configure files example
A collection of handy scripts that help me import tracks from CD images
in .WAV(.FLAC, .APE, etc.)/.CUE combination and build my music library.
Capitalization Rules for Song Titles
1. The first and last words are always capitalized, and all except the
words listed below are capitalized.
2. These are lower-case, unless they are the first word or last word.
- articles: a, an, the
#!/bin/sh
#
# VirtualBox installing script for Oracle Linux 7 ("OL7") | Red Hat
# Enterprise Linux 7 ("RHEL7") | CentOS 7.
#
# Author: Ray Chen <oldsharp@gmail.com>
# License: Public Domain
# Download the PRM package:
wget http://download.virtualbox.org/virtualbox/5.0.12/VirtualBox-5.0-5.0.12_104815_el7-1.x86_64.rpm
@oldsharp
oldsharp / rtl8188eu-ap.sh
Last active July 23, 2022 03:10
rtl8188eu access point control script
#!/bin/sh
# Script to start/stop a hostapd-based access point
#
# Sample start call "rtl8188eu-ap.sh start wlan0 eth0"
# Stop with "rtl8188eu-ap.sh stop"
#
# Get driver for rtl8188eu: https://github.com/lwfinger/rtl8188eu
case "$1" in
start)
@oldsharp
oldsharp / vimrc-basic
Last active February 7, 2017 08:30
A basic vimrc without fancy features
" A basic Vim configure file without fancy features.
"
" Author: Ray Chen <oldsharp@gmail.com>
" License: Public Domain
set nocompatible
colorscheme default
set number
set wrap
@oldsharp
oldsharp / caps2ctrl.sh
Last active January 11, 2016 10:32
Turn Caps-Lock into an extra Control key
#!/bin/sh
#
# For GNOME Desktop: Turn Caps-Lock into an extra Ctrl key by changing
# the dconf value.
#
# Author: Ray Chen <oldsharp@gmail.com>
# License: Public Domain
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps']"
@oldsharp
oldsharp / ddns.sh
Last active January 11, 2016 10:45
Dynamic DNS POST request that matches the API provided by Google Domains
#!/bin/sh
#
# Construct a Dynamic DNS POST request that matches Google Domains' API.
# The final URL format should looks like:
# https://username:password@domains.google.com/nic/update?hostname=subdomain.yourdomain.com&myip=1.2.3.4
# See https://support.google.com/domains/answer/6147083
#
# Author: Ray Chen <oldsharp@gmail.com>
# License: Public Domain