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
############### | |
# Launches (and patches) the android emulator by running all the scripts within the patch directory. The default | |
# value of ANDROID_EMU_PATCHES is ${HOME}/.android/avd/patches. You can specify a different value for the patch | |
# directory by specifying ANDROID_EMU_PATCHES as an environment variable. | |
# | |
# The scripts within the patch directory will be executed in order. The variable "${ADB}" can be used within a | |
# script to get the correct adb command to run (targetted to the appropriate port). The variable "${ANDROID_EMU_TDIR}" | |
# points to a directory that will be cleaned up when the emulator exits. The variable "${ANDROID_EMU_PATCHES}" will | |
# be set to the effective patch directory. | |
# |
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
########### | |
# Installs and/or updates homebrew and various components | |
# | |
#!/bin/bash | |
: ${HOMEBREW_INST_URL:="https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh"} | |
: ${HB_BOOTSTRAP_GIST_URL:="https://gist.githubusercontent.com/toonetown/48101686e509fda81335/raw"} | |
if [ $# -eq 0 ]; then | |
echo "Usage: ${0} [--fetch-only] <PACKAGES...>" | |
echo "" |
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/python3 | |
import http.server, ssl, argparse, re | |
from tempfile import mkdtemp | |
from shutil import rmtree | |
from contextlib import contextmanager | |
from os.path import exists, join, abspath | |
@contextmanager | |
def TemporaryDirectory(): | |
name = mkdtemp() |
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/python | |
# link-sdks | |
# Nathan Toone <[email protected]> | |
# Based on work by Rob Napier <[email protected]> | |
# Script to link in all your old SDKs every time you upgrade Xcode | |
# Create a directory called /Applications/Developer/SDKs (or modify source_path, or pass argument). | |
# Under it, put all the platform directories: | |
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform |
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
### | |
# Shell script which adds the ability to encode/decode web-safe URLs in base64. Do this by specifying | |
# | |
#!/bin/bash | |
ARGS=() | |
BAD_CHARS="+/=" | |
SAFE_CHARS="-_ " | |
URL="n"; CONVERT="n"; DECODE="n"; IN="-"; OUT="-"; HELP="n" | |
while (($#)); do | |
case "${1}" in |
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 | |
# Adds a user via command line, and sets the machine as "Setup Done" | |
# Ensure that it runs as root | |
if [ "$(id -u)" != "0" ]; then | |
echo "${0} must be run as root, or using sudo" | |
exit 1 | |
fi | |
if [ -n "${1}" -a -n "${2}" -a -n "${3}" -a -n "${4}" ]; then |
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 | |
# Permanently deletes the given users and resets the system to an empty state | |
# Ensure that it runs as root | |
if [ "$(id -u)" != "0" ]; then | |
echo "${0} must be run as root, or using sudo" | |
exit 1 | |
fi | |
if [ ! "${1}" ]; then |
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 | |
# | |
# A script to facilitate passing data from host to container in a daemon | |
# | |
# To read a variable (from within the container): | |
# VAR="$(docker_pipe read)" | |
# | |
# !!! Note that reading a variable will block until it is written to !!! | |
# | |
# To write to the variable that is being read (from the host): |
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/expect | |
# | |
# A script to handle automatic entering of ssh passwords. It is intended that this script | |
# mainly be used from within a docker image in conjunction with docker_pipe to avoid | |
# placing private keys and passwords in your image. | |
# | |
# This script can be used as a drop-in replacement for ssh, as all parameters are passed | |
# to the ssh command. | |
# | |
# To use (reading the password from the command line): |
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 | |
####### | |
# A script which finds various code violations (such as line spacing or trailing spaces) | |
# | |
_SCRIPT="${0}" | |
_QUIET=""; _TRAIL_ONLY=""; _EMPTY=""; _LENGTH_ONLY=""; _MAX_LENGTH=120; _PATHS=(); _ERR="" | |
_err () { "${_SCRIPT}" __XXX__ "$@"; exit $?; } | |
while [ $# -gt 0 ]; do |
OlderNewer