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 | |
# Construct a tree of folders to match the structure | |
# (below the root) given for iPhone text message | |
# attachments, using symbolic links to the actual files | |
# in the backup. | |
# | |
# The text message file is 3d0d7e5fb2ce288813306e4d4636395e047a3d28 | |
# See also https://osxdaily.com/2010/07/08/read-iphone-sms-backup/ | |
# https://commons.erau.edu/cgi/viewcontent.cgi?article=1099&context=jdfsl |
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 | |
# This will prune merged and deleted branches from your git repository. | |
# It assumes you're on a "master" branch tracking the origin you like. | |
# | |
# To run it, you need git (duh), perl, cut, grep and xargs. Pretty standard stuff. | |
git=/usr/bin/git | |
master=$(git branch | grep "^\*" | cut -f2 -d\ ) |
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 | |
. ./.cccreds | |
function ccstatus { | |
curl -X POST \ | |
http://periscope.raleighnc.gov/periscopeApi/sustainability.getEvFocusXml \ | |
--data-binary '<str name="val" val="" />' \ | |
-H 'Content-type: text/xml' \ | |
--compressed \ |
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 os | |
lists=list([x.strip().split(": ",1)[1] for x in | |
"""Week 1: https://goo.gl/KWlyOO Week 2: https://goo.gl/Pn7MFs | |
Week 3: https://goo.gl/CZwxsX Week 4: https://goo.gl/JhwuON | |
Week 5: https://goo.gl/TGM6x8 Week 6: https://goo.gl/uhyjxe | |
Week 7: https://goo.gl/bMdhTG Week 8: https://goo.gl/89MW8h | |
Week 9: https://goo.gl/ekv9wE Week 10: https://goo.gl/RETyH1 | |
Week 11: https://goo.gl/6cs0tt Week 12: https://goo.gl/bRMx5o |
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/env python3 | |
from circuits.web.client import Client, request as request_event | |
from circuits.web import Server, Controller | |
from circuits import handler, Debugger | |
class Root(Controller): | |
channel = "web" | |
def __init__(self): |
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 | |
from circuits import Debugger, BaseComponent, handler | |
from circuits.web import Controller, Server | |
from circuits.web.errors import redirect | |
from urllib.parse import urlparse, urlunparse | |
class Root(Controller): | |
def index(self): | |
return "Hello World!" |
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
$ cat git-show-big | |
#!/bin/bash | |
# Ref http://naleid.com/blog/2012/01/17/finding-and-purging-big-files-from-git-history | |
SHAS=$(git rev-list --objects --all | sort -k 2) | |
BIGOBJS=$(git gc && git verify-pack -v .git/objects/pack/pack-*.idx | egrep "^\w+ blob\W+[0-9]+ [0-9]+ [0-9]+$" | sort -k 3 -n -r) | |
join <(echo "$BIGOBJS" | sort ) <(echo "$SHAS" | sort ) | sort -k 3 -n -r | cut -f 1,3,6- -d\ |
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 | |
curl http://localhost:8983/solr/gettingstarted/schema -D - -X POST -H \ | |
'Content-type:application/json' --data-binary '{ | |
"add-field" : { | |
"name":"name", | |
"type":"text_general", | |
"stored":true | |
}, | |
"add-field" : { |
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 | |
function whereIsFile() { | |
pushd . > /dev/null | |
FILE_PATH=$1; | |
while([ -h "${FILE_PATH}" ]) do cd -P $(dirname "${FILE_PATH}"); FILE_PATH=$(readlink "${FILE_PATH}"); done | |
cd -P $(dirname "${FILE_PATH}") > /dev/null | |
echo $(pwd) | |
popd >/dev/null | |
} |
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/sh | |
FILE_PATH=$1; | |
while([ -h "${FILE_PATH}" ]) do cd -P $(dirname "${FILE_PATH}"); FILE_PATH=$(readlink "${FILE_PATH}"); done | |
cd -P $(dirname "${FILE_PATH}") > /dev/null | |
echo $(pwd); |
NewerOlder