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 | |
# username needs to be specified | |
if [ -z "$1" ]; then | |
echo "usage: $(basename $0) username"; | |
exit; | |
fi | |
username=$1; | |
# we need to be running as root |
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
= LUL | |
:author: Chisel Wright | |
:twitter: @chizcw | |
Some intro will go here | |
Data mostly from: http://en.wikipedia.org/wiki/List_of_London_Underground_stations#Stations | |
vim search/replace: | |
* s!^\([a-z]\+\) \(.\+\)$!CREATE (\1:Station { name:"\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
#!/usr/bin/env bash | |
# vim: ts=8 sts=4 et sw=4 sr sta | |
# only do the updates if this file is newer than our git config file | |
# (that means we've some something here) | |
if test $BASH_SOURCE -nt $HOME/.gitconfig; then | |
echo "[Updating git aliases...]"; | |
# exit immediately if we have the lockfile | |
if [ -f $HOME/.bashrcd.gitalias.lock ]; then |
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
public void copy_db() { | |
// copy the db to the sdcard | |
try { | |
File sd = Environment.getExternalStorageDirectory(); | |
if (sd.canWrite()) { | |
String currentDBPath = this.myContext.getDatabasePath(this.getDatabaseName()).toString(); | |
// use out package as the place to store files | |
String backupDirectory = "/" + this.myContext.getPackageName(); |
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 perl | |
use strict; | |
use warnings; | |
use feature ':5.12'; | |
use version; | |
use Text::SimpleTable; | |
my @versionstrings = ( | |
'0.0.4', |
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 perl | |
# An irssi plugin that makes it easier to change your nick and away status to | |
# make your availability really obvious (used at $work) | |
# | |
# Simple examples are: | |
# gone --> gone = "/availability gone"; | |
# idme = "/msg NickServ IDENTIFY s3kritw0rd"; | |
# here --> here = "/availability here; /idme"; |
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
package My::Class; | |
use strict; | |
use warnings; | |
use Moose; | |
use MooseX::AttributeHelpers; | |
use MooseX::Types::Moose qw/ArrayRef Int/; | |
use MooseX::Types -declare => [qw(Thingy ThingyList)]; | |
subtype Thingy, |
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
*.sw? |