This file contains hidden or 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/sh | |
HOSTNAME=`hostname` | |
# command to launch terminal | |
TERM_CMD="xfce4-terminal" | |
# what my terminal window name will always start with | |
NAME_PREFIX="#!" |
This file contains hidden or 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/python2 | |
import os, sys | |
# list comprehension to stick a dot onto each given extension | |
exts = ['.' + ext for ext in sys.argv[2:]] | |
# dictionaries that hold the count data | |
fileCount = dict(); lineCount = dict() | |
# functin to count lines in a file |
This file contains hidden or 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/sh | |
if [ -z "$1" ]; then | |
bname=`basename $0` | |
echo "Usage: $bname SHA" | |
exit 1 | |
fi | |
PATCH_ID=`git show -p $1 | git patch-id | awk '{print$1}'` |
This file contains hidden or 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/sh | |
DEST="$1" | |
if [ -z "$DEST" ]; then | |
echo "USAGE: $0 [location]" | |
echo -e "\nsupported locations: " | |
echo -e "\thalf-left, half-right" | |
echo -e "\tthird-left, third-middle, third-right" | |
echo -e "\tquarter-top-left, quarter-rop-right, quarter-bottom-left, quarter-bottom-right" |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/time.h> | |
int* split(int n, int numPieces); | |
int randInt(int min, int max); | |
int sumList(int* list, int size); | |
void printList(int* list, int size); | |
void seedrand(); |
This file contains hidden or 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
import java.util.ArrayList; | |
import java.util.Random; | |
import java.lang.Math; | |
public class Split { | |
private static Random rand = new Random(); | |
public static void main(String[] args) { | |
ArrayList<Integer> list = splitNum(Integer.valueOf(args[0]), Integer.valueOf(args[1])); |
This file contains hidden or 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/python2.7 | |
import sys | |
from random import randrange | |
def split(n, numPieces): | |
rtn = [] | |
for i in range(numPieces): | |
# get a good starting position to deviate from |
This file contains hidden or 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/sh | |
FILE=~/Dropbox/creds.txt | |
DISPPASS="$1" | |
read -s -p "Please enter master passphrase: " PASSPHRASE | |
printf "\n" | |
# decrypt to /tmp | |
[ -f /tmp/creds.txt ] && rm /tmp/creds.txt | |
echo "$PASSPHRASE" | gpg --batch -q -o /tmp/creds.txt --passphrase-fd 0 --cipher-algo AES256 --decrypt "$FILE" &> /dev/null |
This file contains hidden or 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/sh | |
# do we have the necessary software? | |
FFMPEG=`which ffmpeg` | |
XWININFO=`which xwininfo` | |
XDGOPEN=`which xdg-open` | |
if [ -z "$FFMPEG" ]; then | |
echo "ffmpeg not available" | |
exit 1 |
This file contains hidden or 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
package com.raidzero.xposed.bfquieter; | |
import de.robv.android.xposed.IXposedHookLoadPackage; | |
import de.robv.android.xposed.XC_MethodReplacement; | |
import de.robv.android.xposed.XposedBridge; | |
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; | |
import static de.robv.android.xposed.XposedHelpers.findAndHookMethod; | |
/** |