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; |
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
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
#!/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
# 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
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
# Thin serving Rails. | |
upstream app_server { | |
server 127.0.0.1:3050 fail_timeout=0; | |
} | |
# SSL/TLS certificates - the key should be 4096 bit generated with: 'openssl genrsa -des3 -out server.key 4096' | |
ssl_certificate_key /var/app/deploy/www.thisisatest.com.key; | |
ssl_certificate /var/app/deploy/www.thisisatest.com.chained.crt; | |
# Ideally we'd have only TLSv1.2, but that compromises client support significantly |
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
# Install node (for brunch) | |
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add - | |
echo 'deb https://deb.nodesource.com/node_4.x trusty main' | sudo tee /etc/apt/sources.list.d/nodesource.list | |
echo 'deb-src https://deb.nodesource.com/node_4.x trusty main' | sudo tee -a /etc/apt/sources.list.d/nodesource.list | |
sudo apt-get update | |
sudo apt-get install --yes nodejs | |
# Install erlang and elixir | |
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb &&\ | |
sudo dpkg -i erlang-solutions_1.0_all.deb &&\ |
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
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add - | |
echo 'deb https://deb.nodesource.com/node_8.x trusty main' | sudo tee /etc/apt/sources.list.d/nodesource.list | |
echo 'deb-src https://deb.nodesource.com/node_8.x trusty main' | sudo tee -a /etc/apt/sources.list.d/nodesource.list | |
sudo apt-get update | |
sudo apt-get install --yes nodejs |
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
### Keybase proof | |
I hereby claim: | |
* I am daveslutzkin on github. | |
* I am daveslutzkin (https://keybase.io/daveslutzkin) on keybase. | |
* I have a public key whose fingerprint is F57C 68E3 1BBE EE43 581E 799A AA29 AD04 7A4E DCB0 | |
To claim this, I am signing this object: |
OlderNewer