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
with | |
num_buckets as (select 10), | |
suburbs as (select unnest(array['Fitzroy North','Northcote','Brunswick East','Clifton Hill'])), | |
rows as ( | |
select | |
price as field | |
from | |
results inner join properties on (property_id=properties.id) | |
where |
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
# Frees up a lot of disk space by removing almost everything from the docker cache. | |
# Get rid of all unnamed containers. | |
sudo docker ps -a | grep -v ":" | grep -v "ID" | awk '{ print $1 }' | sort | uniq | xargs sudo docker rm | |
# Get rid of all unnamed images. | |
sudo docker images | grep "^<none>" | awk '{ print $3 }' | xargs sudo docker rmi |
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 | |
# Attempts to fast-forward the current local branch to its remote tracked branch. | |
# Safely refuses if there is no remote tracking, or if a fast-forward is not possible. | |
# @author Paul Annesley | |
if [ -n "$(git merge --ff-only 2>&1 | grep 'unknown option')" ]; then | |
echo "Your git doesn't seem to support --ff-only... try git 1.7+" | |
exit 1 | |
fi |
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
VBoxManage startvm greenstein --type headless |
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
rsync -avzhr --delete 2012/ daveslutzkin@Shakespeare.local:/Volumes/Moozaic/New-Music/Music/2012 |
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
select from_unixtime(timecreated,"%Y-%m") as month,(substring_index(substring_index(group_concat(t._price order by t._price), ',', ceiling(count(*)/2)), ',', -1) + substring_index(substring_index(group_concat(t._price order by t._price), ',', -ceiling(count(*)/2)), ',', 1)) / 2 as median from auction t where status='won' group by month; |
NewerOlder