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
sudo add-apt-repository ppa:phablet-team/tools | |
sudo apt-get update | |
sudo aptitude -y install phablet-tools android-tools-adb android-tools-fastboot | |
phablet-flash ubuntu-system --channel devel --bootstrap |
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
# Check for updates on initial load... | |
if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then | |
/usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh $ZSH/tools/check_for_upgrade.sh | |
fi | |
# Initializes Oh My Zsh | |
# add a function path | |
fpath=($ZSH/functions $ZSH/completions $fpath) |
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
➜ _posts git:(master) ✗ file 2014-01-20-schreibdochmal_19_01_14.md | |
2014-01-20-schreibdochmal_19_01_14.md: exported SGML document, UTF-8 Unicode (with BOM) text, with very long lines | |
➜ _posts git:(master) ✗ file 2014-01-11-the-making-of-a-timelapse.md | |
2014-01-11-the-making-of-a-timelapse.md: ASCII text, with very long lines |
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
awk '{if(NR==1)sub(/^\xef\xbb\xbf/,"");print}' INFILE > OUTFILE |
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
x, *xs, y, z = map(lambda j: lambda i: j**i ,range(1, 10)) | |
x(2),y(2),z(2) |
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
" Pathogen : https://github.com/tpope/vim-pathogen | |
execute pathogen#infect() | |
set nocompatible " be iMproved | |
filetype off " required! | |
" Setting up Vundle - the vim plugin bundler | |
let iCanHazVundle=1 | |
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) | |
echo "Installing Vundle.." |
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 | |
BASE="/mnt/eventcam/" | |
COMPRESS=0 | |
RERUN=0 | |
UPLOAD=1 | |
TODAY=`date +%Y%m%d` | |
# Move all jpgs in to per date folder for processing | |
for file in `find $BASE -maxdepth 1 -name '*.jpg' -type f -print`; do | |
newfilename=`echo $file | awk -F '-' '{print $2$3}'` | |
date=`echo $newfilename | cut -c 1-8` |
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
# Rename this distribution example file to motion.conf | |
# | |
# This config file was generated by motion 3.2.11 | |
############################################################ | |
# Daemon | |
############################################################ | |
# Start in daemon (background) mode and release terminal (default: off) |
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 | |
usage() { | |
cat << EOF | |
This script imports a git repo (accessible from https://\$origin/\$user/\$repo) and all its history as subdirectory of a destination (available locally at \$dest) | |
It is designed for non-production, archival processes and may destroy everything you've ever loved because you looked at it funny. You have been warned. | |
The structure of the destination will end up something like this: | |
~/src | |
- \$dest | |
- origins |
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 | |
# Example script to start up tunnel with autossh. | |
# This script will tunnel 22 from the local host | |
# to 11122 on the remote host. If that post isn't | |
# availabile it'll increment. Also does the same | |
# with 8888/11188 for ipython notebook | |
# REQUIRED autossh | |
HOST=${@: -1} | |
REMOTE_SSH_PORT=11122 | |
REMOTE_HTTP_PORT=11188 |