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
| # posted partly as an aide-memoire, but more usefully, as a prompt | |
| # for me to make this into a proper stop-start daemon | |
| # hopefully, one that won't have hardcoded machine names... | |
| IPADDR=`ifconfig en0 | grep 'inet ' | awk '{print $2}' | sed 's/addr://'` | |
| ssh house.husk.org -N -f -L *:3698:foil:3689 | |
| dns-sd -P "foil" _daap._tcp. local 3698 foil.local. $IPADDR txtvers=1 "Database ID=BC2C8AD5" "Machine ID=BC2C8AD5" & |
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/perl | |
| use strict; | |
| use warnings; | |
| use File::Path; | |
| sub folder($) { | |
| my $file = shift; | |
| my (undef, undef, undef, $day, $mon, $year) = localtime((stat($file))[10]); | |
| $year += 1900; |
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/perl | |
| use strict; | |
| use warnings; | |
| my $headref = `git symbolic-ref HEAD`; | |
| my $head; | |
| unless (($head) = ($headref =~ m!^refs/heads/(.*)!)) { | |
| die "invalid HEAD ref '$headref'"; | |
| } |
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/perl | |
| use strict; | |
| use warnings; | |
| my $headref = `git symbolic-ref HEAD`; | |
| if (my ($head) = ($headref =~ m!^refs/heads/(.*)!)) { | |
| my $fh; | |
| unless (open($fh, '-|', qw[git branch -r --no-merge HEAD])) { | |
| print STDERR "Couldn't execute 'git branch -r --no-merge HEAD': $!\n"; |
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 | |
| # Wraps distcc compiler calls in ccache. | |
| # Install at /Developer/usr/bin. | |
| DISTCC=/usr/bin/distcc | |
| export CCACHE_PREFIX="$DISTCC" | |
| if [ "$1" == "--host-info" ]; then |
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/bash | |
| # Given a grep expression, create a graph of occurrences of that expression | |
| # in your code's history. | |
| set -e | |
| expr="$1" | |
| datafile=$(mktemp) |
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/perl -w | |
| # symirror - build spectral forest of symlinks | |
| use strict; | |
| use File::Find; | |
| use Cwd; | |
| my ($srcdir, $dstdir); | |
| my $cwd = getcwd(); | |
| die "usage: $0 realdir mirrordir" unless @ARGV == 2; |
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/perl | |
| use strict; | |
| use warnings; | |
| my $mirror_branch = '__mirror'; | |
| for (<>) { | |
| chomp; | |
| my ($old, $new, $branch) = split / /; |
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/perl | |
| use strict; | |
| use warnings; | |
| my $ref = `git stash create`; | |
| chomp($ref); | |
| $ref ||= 'HEAD'; |
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 | |
| USAGE='[-b <branch>] [--interactive | -i] [-v] [--quiet | -q] <base> [<target>]' | |
| SUBDIRECTORY_OK=Yes | |
| . git-sh-setup | |
| rebase_options= | |
| set -e |
OlderNewer