{
"body": {
"key": {
"fingerprint": "02d7aaa16da8c4f33c0880121da5b9b0890e9e75",
"host": "keybase.io",
"key_id": "1DA5B9B0890E9E75",
"uid": "9cfb3b33c884fd59287d29a437826100",
"username": "aussiegeek"
},
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
# frozen_string_literal: true | |
# exa & bat are used in my .zshrc aliases, so install it asap | |
brew 'exa' | |
brew 'bat' | |
tap 'homebrew/bundle' | |
tap 'homebrew/cask' | |
tap 'homebrew/services' | |
tap 'homebrew/cask-drivers' |
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
require "rexml/document" | |
SCHEDULER.every '1m', :first_in => 0 do |job| | |
stop_no = 1819 | |
url = URI.parse('http://ws.tramtracker.com.au/pidsservice/pids.asmx') | |
request =Net::HTTP::Post.new(url.path) | |
request.body = %Q{<?xml version="1.0" encoding="utf-8"?> | |
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> | |
<soap12:Header> | |
<PidsClientHeader xmlns="http://www.yarratrams.com.au/pidsservice/"> |
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
$ gh fork | |
/Users/alan/.rvm/gems/ruby-1.9.2-p0/gems/github-0.4.5/lib/github/extensions.rb:11: warning: undefining `object_id' may cause serious problems | |
/Users/alan/.rvm/gems/ruby-1.9.2-p0/gems/github-0.4.5/lib/github.rb:151:in `module_eval': /Users/alan/.rvm/gems/ruby-1.9.2-p0/gems/github-0.4.5/lib/commands/commands.rb:57: syntax error, unexpected ')' (SyntaxError) | |
helper.tracking.sort { |(a,),(b,)| a == helper.origin ? -... | |
^ | |
/Users/alan/.rvm/gems/ruby-1.9.2-p0/gems/github-0.4.5/lib/commands/commands.rb:57: syntax error, unexpected '|', expecting '=' | |
...per.tracking.sort { |(a,),(b,)| a == helper.origin ? -1 : b ... | |
... ^ | |
/Users/alan/.rvm/gems/ruby-1.9.2-p0/gems/github-0.4.5/lib/commands/commands.rb:57: syntax error, unexpected '}', expecting keyword_end | |
...rigin ? 1 : a.to_s <=> b.to_s }.each do |(name,user_or_url)| |
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 | |
export AWS_ACCESS_KEY_ID="<s3 access id>" | |
export AWS_SECRET_ACCESS_KEY="<s3 secret access key>" | |
export PASSPHRASE="" #left blank intentionally | |
export DEST="s3+http://<backup bucket name>/" | |
export SRC="<local src path>" | |
export GPG_KEY="<e-mail address of gpg key>" | |
duplicity --encrypt-key $GPG_KEY --full-if-older-than 1M $SRC $DEST | |
duplicity remove-older-than 1Y $DEST --force | |
duplicity cleanup $DEST --force |
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
ABAddressBookRef addressBook = ABAddressBookCreate(); | |
CFArrayRef people = ABAddressBookCopyArrayOfAllPeople(addressBook); | |
CFMutableArrayRef peopleMutable = CFArrayCreateMutableCopy( | |
kCFAllocatorDefault, | |
CFArrayGetCount(people), | |
people | |
); | |
CFRelease(people); | |
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
RewriteCond %{REQUEST_URI} !^/(store|images|scripts|favicon.ico|javascript|SpryAssets|stylesheets|robots.txt).* | |
RewriteRule (.*) http://www.domain.com$1 [R,L] |
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
<?php | |
function verify_password($password, $crypted_password, $password_salt) { | |
$digest = $password . $password_salt; | |
for ($i=0; $i < 20; $i++) { | |
$digest = hash('sha512', $digest); | |
} | |
return $digest == $crypted_password; | |
} | |
?> |
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
export GEMDIR=`gem env gemdir` | |
gemdoc() { | |
open $GEMDIR/doc/`$(which ls) $GEMDIR/doc | grep $1 | sort | tail -1`/rdoc/index.html | |
} | |
_gemdocomplete() { | |
COMPREPLY=($(compgen -W '$(`which ls` $GEMDIR/doc)' -- ${COMP_WORDS[COMP_CWORD]})) | |
return 0 | |
} |
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
Haml::Template.options = {:attr_wrapper => "\""} |
NewerOlder