Since using an integrity checking storage medium only guarantees that a file is not damaged, it may be more appropriate to call it git-annex-scrub.
Which leads to...
#!/bin/bash | |
set -o errexit | |
set -x | |
# TODO: Want to have it be that TARGET is just the place where the repo will be created... | |
# TODO: Make it better detect existing repo | |
# TODO: Should probably just have confirmations before doing anything destrcutive.... | |
# TODO: Do that thing where you make it catch any errors from any command |
'Space Duel, by | |
'Tim Sanders | |
DECLARE SUB BadGuy.Deathscene () | |
DECLARE SUB intro () | |
DECLARE SUB spark () | |
DECLARE SUB hold (inded!) | |
DECLARE SUB delay (time!) | |
DECLARE SUB deth () | |
DECLARE FUNCTION wc! () | |
DIM A%(200) |
// This function fetches all kittens from flikr api near me | |
function getKittens() { | |
var url = 'https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=e8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8&lat=37.781157&lon=-122.398720&radius=1&radius_units=km&per_page=20&format=json&nojsoncallback=1'; | |
$.getJSON(url, function(data) { | |
var kittens = data.photos.photo; | |
for (var i = 0; i < kittens.length; i++) { | |
var kitten = kittens[i]; | |
var url = 'http://farm' + kitten.farm + '.static.flickr.com/' + kitten.server + '/' + kitten.id + '_' + kitten.secret + '_m.jpg'; | |
$('#kittens').append('<img src="' + url + '">'); | |
} |
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch Built-in web server", | |
"type": "php", | |
"request": "launch", |
#!/bin/bash | |
# | |
# Start mosh-server, but first create a port redirection in the NAT | |
# router (with UPnP) and delete that redirection again just before | |
# mosh-server exits. | |
# | |
# Created: 20 Sep 2012 | |
# Author: Bert Bos <[email protected]> | |
# original: https://www.mail-archive.com/[email protected]/msg00103/mosh-server-upnp | |
# tweaked to reference /usr/bin/mosh-server directly |
adb shell pm list packages -f | awk -F: '{print $2}' | awk -F= '{print $1}' | while read line; do adb pull -a $line; done |
#!/bin/sh | |
adb shell 'umount /system || [ $? -eq 1 ]' | |
adb shell 'umount /data || [ $? -eq 1 ]' | |
adb shell mount -r /system | |
adb shell mount -r /data | |
adb shell 'stty raw; tar cpf - /system 2>/dev/null' | pv > system.tar | |
adb shell 'stty raw; tar cpf - /data 2>/dev/null' | pv > data.tar |
# See docs in http://git-annex.branchable.com/internals/hashing/ and implementation in http://sources.debian.net/src/git-annex/5.20140227/Locations.hs/?hl=408#L408 | |
import hashlib | |
import struct | |
def hashdirlower(key): | |
hasher = hashlib.md5() | |
hasher.update(key) | |
digest = hasher.hexdigest() | |
return "%s/%s/" % (digest[:3], digest[3:6]) |
#!/bin/sh | |
adb shell pm list packages -f | grep data/app | awk -F: '{print $2}' | awk -F= '{print $1}' | while read line; do adb pull -a $line; done |