This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import random | |
def BinarySearchInsertPoint(searchArray, searchKey): | |
if len(searchArray) == 0: | |
return 0 | |
middleIndex = int(len(searchArray) / 2 - 0.5) | |
print( | |
"Target Array", | |
searchArray, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am RJHsiao on github. | |
* I am rj_hsiao (https://keybase.io/rj_hsiao) on keybase. | |
* I have a public key whose fingerprint is 3262 A44C 7509 CBCC 23C2 3080 EC55 BD08 D155 D337 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ ! -w /sys/devices/platform/i8042/serio1/serio2/sensitivity -o ! -w /sys/devices/platform/i8042/serio1/serio2/speed ];then | |
gksu --description "Get write permission to set TrackPoint's Speed & Sensitivity" chmod g+w /sys/devices/platform/i8042/serio1/serio2/sensitivity /sys/devices/platform/i8042/serio1/serio2/speed | |
fi | |
if [ `cat /sys/devices/platform/i8042/serio1/serio2/sensitivity` -ne 255 -o `cat /sys/devices/platform/i8042/serio1/serio2/speed` -ne 120 ]; then | |
echo -n 255 > /sys/devices/platform/i8042/serio1/serio2/sensitivity | |
echo -n 120 > /sys/devices/platform/i8042/serio1/serio2/speed | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 92.741] | |
X.Org X Server 1.11.3 | |
Release Date: 2011-12-16 | |
[ 92.741] X Protocol Version 11, Revision 0 | |
[ 92.741] Build Operating System: Linux 2.6.24-31-server x86_64 Ubuntu | |
[ 92.741] Current Operating System: Linux RJ-Lachesis 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 | |
[ 92.741] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-26-generic root=UUID=76c59cf4-314a-424c-9a9e-a0ab65837518 ro quiet splash vt.handoff=7 | |
[ 92.741] Build Date: 07 May 2012 11:43:21PM | |
[ 92.741] xorg-server 2:1.11.4-0ubuntu10.2 (For technical support please see http://www.ubuntu.com/support) | |
[ 92.741] Current version of pixman: 0.24.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WEBVTT FILE | |
1 | |
00:00:00.500 --> 00:00:02.000 D:vertical A:start | |
The Web is always changing | |
2 | |
00:00:02.500 --> 00:00:04.300 | |
and the way we access it is changing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GTK+ Input Method Modules file | |
# Automatically generated file, do not edit | |
# Created by /usr/lib/x86_64-linux-gnu/libgtk2.0-0/gtk-query-immodules-2.0 from gtk+-2.24.17 | |
# | |
# ModulesPath = /home/rj/.gtk-2.0/2.10.0/x86_64-pc-linux-gnu/immodules:/home/rj/.gtk-2.0/2.10.0/immodules:/home/rj/.gtk-2.0/x86_64-pc-linux-gnu/immodules:/home/rj/.gtk-2.0/immodules:/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/x86_64-pc-linux-gnu/immodules:/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules:/usr/lib/x86_64-linux-gnu/gtk-2.0/x86_64-pc-linux-gnu/immodules:/usr/lib/x86_64-linux-gnu/gtk-2.0/immodules:/usr/lib/gtk-2.0/2.10.0/x86_64-pc-linux-gnu/immodules:/usr/lib/gtk-2.0/2.10.0/immodules:/usr/lib/gtk-2.0/x86_64-pc-linux-gnu/immodules:/usr/lib/gtk-2.0/immodules | |
# | |
"/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-cedilla.so" | |
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa" | |
"/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>File-DataURL Converter</title> | |
<style> | |
.converter-block > textarea { | |
width: 800px; | |
height: 300px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# brew-cask-upgrade.sh: "Brew-Cask-Upgrade" | |
# Author: RJ Hsiao <rj-at-rjhsiao.me> | |
# Url: https://gist.github.com/RJHsiao/d4ee0ff671e76b02d9e5706294d3597c | |
# License: GPLv3 | |
# Usage: sh brew-cask-upgrade.sh [options] | |
readonly NAME="Brew-Cask-Upgrade" | |
readonly VERSION="1.1.5" | |
readonly URL="https://gist.github.com/RJHsiao/d4ee0ff671e76b02d9e5706294d3597c" |