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 -e | |
# inspired by this https://gist.github.com/dbu/2843660 | |
find . -name .git -type d | while read dir ; do git -C $(dirname $dir) status -s ; done |
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 -e | |
VIDEO_SZ=1280x720 | |
VIDEO_FPS=60 | |
VIDEO_FMT=yuv4mpegpipe | |
VIDEO_PIXEL_FMT=yuv420p | |
VIDEO_IN_FILE="$1" | |
VIDEO_IN_FILE_BASENAME=$(basename "$VIDEO_IN_FILE") | |
VIDEO_OUT_FILE=output/stamped-$VIDEO_IN_FILE_BASENAME | |
IMAGE_EXTENSION=png |
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 -e | |
CONTAINER=$1 | |
lxc exec $CONTAINER -- apt-get -y install openssh-server | |
lxc exec $CONTAINER -- visudo | |
lxc exec $CONTAINER -- mkdir -p /home/ubuntu/.ssh/ | |
lxc file push ~/.ssh/id_rsa $CONTAINER/home/ubuntu/.ssh/id_rsa | |
lxc file push ~/.ssh/id_rsa.pub $CONTAINER/home/ubuntu/.ssh/id_rsa.pub | |
lxc file push ~/.ssh/id_rsa.pub $CONTAINER/home/ubuntu/.ssh/authorized_keys |
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/perl | |
use strict; | |
use Getopt::Long qw(:config no_auto_abbrev); | |
use Net::Pcap; | |
use NetPacket::Ethernet; | |
use NetPacket::IP; | |
use NetPacket::UDP; | |
use Net::RTP::Packet; | |
$|=1; |
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/perl | |
use Net::Pcap; | |
die "Usage: $0 infile outfile" unless scalar(@ARGV) > 1; | |
my $err; | |
open(my $out, '>:raw', $ARGV[1]) or die "cannot open in file: $!"; |
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
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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 file must be executable to work! chmod 755! | |
key="$1" | |
opts="-fstype=cifs,file_mode=0640,dir_mode=0750" | |
macaddr=`grep $key /etc/ethers | egrep -v '^#' | cut -d' ' -f1` | |
max_retries=60 | |
ping_deadline=1 |
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/perl | |
################################################################################ | |
## taskwarrior - a command line task list manager. | |
## | |
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez. | |
## | |
## Permission is hereby granted, free of charge, to any person obtaining a copy | |
## of this software and associated documentation files (the "Software"), to deal | |
## in the Software without restriction, including without limitation the rights | |
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
edge.mode=1 | |
edge.column=80 | |
font.base=$(font.monospace) | |
font.small=$(font.monospace) | |
font.comment=$(font.monospace) | |
font.text=$(font.monospace) | |
font.text.comment=$(font.monospace) | |
font.embedded.base=$(font.monospace) | |
font.embedded.comment=$(font.monospace) |
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
$cue = 'c:\Users\gp\example.cue' | |
$patt = '(?smi)TITLE\s"([^"]*)"(?:\n|\s)*PERFORMER\s*"([^"]*)"' | |
cat $cue -Raw | | |
sls -patt $patt -AllMatches | | |
% { $_.Matches } | | |
% { New-Object -Property @{ Title = $_.Groups[1].Value; Artist = $_.Groups[2].Value } } | | |
% { "\track {0} - {1}" -f $_.Artist, $_.Title } |