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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
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 | |
set -eux | |
sudo apt-get update | |
packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common" | |
# bug: http://www.postgresql.org/message-id/20130508192711.GA9243@msgid.df7cb.de | |
sudo update-alternatives --remove-all postmaster.1.gz |
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 | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/4411254 | |
# chmod 777 github-ubuntu.sh | |
# ./github-ubuntu.sh | |
############################################### | |
echo "*****************************************" | |
echo " Step 1: Check your keys" | |
echo "*****************************************" |
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
-- Functions to create and draw histograms with PostgreSQL. | |
-- psql> select * from show_histogram((select histogram(length(email), 0, 32, 6) FROM auth_user limit 100)); | |
-- bucket | range | count | bar | cumbar | cumsum | cumpct | |
-- --------+-------------------------------------+-------+--------------------------------+--------------------------------+--------+------------------------ | |
-- 0 | [0,5.33333333333333) | 1 | | | 1 | 0.00273224043715846995 | |
-- 1 | [5.33333333333333,10.6666666666667) | 5 | = | | 6 | 0.01639344262295081967 | |
-- 2 | [10.6666666666667,16) | 149 | ============================== | ============= | 155 | 0.42349726775956284153 | |
-- 3 | [16,21.3333333333333) | 145 | ========= |
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
-- Open These views with QGIS | |
-- You can label the ticks view with this expression : "CASE WHEN m % 5 = 0 THEN h END" to get hour numbers | |
-- Set categorized styles on typ and unit to set different styles for dials, and for the hands | |
-- Please tweet your best clock designs with #PostGISClock hashtag | |
create or replace view ticks as | |
select | |
m as id | |
, case when m % 5 = 0 then 'h' else 'm' end as typ | |
, m / 5 as h |