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 | |
# | |
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit) | |
# updated to PostGIS 2.0.1 | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
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
function strToAbbr(str) { | |
str = str.toUpperCase(); | |
str = str.replace(/\b(AND|OR|NOR|BUT|A|AN|THE|AS|AT|BY|FOR|IN|OF|ON|PER|TO)\b/g, ''); | |
var words = str.split(/\s+/), abbr = ''; | |
for(var x = 0; x < words.length; x++) abbr += words[x].substr(0,1); | |
return abbr; | |
} |
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
CREATE OR REPLACE FUNCTION refresh_materialized_views() RETURNS VOID | |
AS | |
$body$ | |
DECLARE | |
result integer; | |
BEGIN | |
EXECUTE (SELECT string_agg('REFRESH MATERIALIZED VIEW ' || oid::regclass::text, ';') | |
FROM pg_class | |
WHERE relkind = 'm'); | |
RETURN; |
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
var state_abbr = [ 'AA','AE','AK','AL','AP','AR','AZ','CA','CO','CT','DC','DE','FL','GA','GU','HI', | |
'IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MS','MT','NC', | |
'ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA','PR','RI','SC','SD','TN', | |
'TX','UT','VA','VT','WA','WI','WV','WY' ]; | |
var prefix_matrix = { 100:38, 101:38, 102:38, 103:38, 104:38, 105:38, 106:38, 107:38, 108:38, | |
109:38, 110:38, 111:38, 112:38, 113:38, 114:38, 115:38, 116:38, 117:38, | |
118:38, 119:38, 120:38, 121:38, 122:38, 123:38, 124:38, 125:38, 126:38, | |
127:38, 128:38, 129:38, 130:38, 131:38, 132:38, 133:38, 134:38, 135:38, | |
136:38, 137:38, 138:38, 139:38, 140:38, 141:38, 142:38, 143:38, 144:38, |
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
{ | |
"endPoints": { | |
"Sites": { | |
"description": "Returns a list of District and School sites.", | |
"method": "GET", | |
"urls": [ | |
"https://<subdomain>.illuminateed.com/<root_dir>/rest_server.php/Api/Sites/" | |
], | |
"responseExample": [ | |
{ |
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 | |
cd /usr/share/postgresql/9.4/tsearch_data | |
wget https://stop-words.googlecode.com/files/stop-words-collection-2011.11.21.zip | |
unzip stop-words-collection-2011.11.21.zip | |
wget http://src.chromium.org/svn/trunk/deps/third_party/hunspell_dictionaries/en_US.dic | |
wget http://src.chromium.org/svn/trunk/deps/third_party/hunspell_dictionaries/en_US.dic_delta | |
wget http://src.chromium.org/svn/trunk/deps/third_party/hunspell_dictionaries/en_US.aff -O en_us.affix | |
# Remove first line |
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
[user] | |
name = Jeffrey Mealo | |
email = jeffreymealo@gmail.com | |
[credential] | |
helper = osxkeychain | |
[core] | |
autocrlf = input | |
excludesfile = /Users/jmealo/.gitignore_global |
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 node | |
var stdin = process.openStdin(); | |
var data = ""; | |
stdin.on('data', function(chunk) { | |
data += chunk; | |
}); |
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
// Insert this just after: if (/move/i.test(verb)) { @ line 115 | |
if (file.indexOf('___jb_bak___') !== -1) { | |
verb = 'PUT'; | |
destination = destination.replace('___jb_bak___', ''); | |
file = destination; | |
fileStream = fs.createReadStream(file); | |
headers['Content-Length'] = fs.statSync(file).size; | |
} | |
/* Add the following entries to your config.json global ignore: |
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
<html> | |
<head> | |
<title>Softphone</title> | |
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> | |
<script> | |
$(function() { | |
var $dialpad = $('#dialpad'); | |
$(document).on('click', '#dialpad,[title="Dialpad"]', function(e) { | |
e.stopPropagation(); |