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/bash | |
apt-get update | |
#Additional Packages | |
apt-get install -y keyutils unzip php5-ldap php5-mssql zsh | |
#PHP OCI8 Driver | |
#Putting the cart before the horse here, but it leaves the only interactive part for the end. |
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
Show hidden characters
// Auto-pair back ticks | |
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context": | |
[ | |
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, | |
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, | |
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true }, | |
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[`a-zA-Z0-9_]$", "match_all": true }, | |
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true } | |
] | |
}, |
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
# convert the version for each pdf in a directory and put them in a sub folder of output | |
for input in *.pdf; do gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile="output/$input" "$input"; done; |
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
git branch: | |
--merged is used to find all branches which can be safely deleted, since those branches are fully contained by HEAD. | |
--no-merged is used to find branches which are candidates for merging into HEAD, since those branches are not fully contained by HEAD. |
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/bash | |
#script to remove some of the default (un-needed/un-used) packages from ubuntu | |
sudo apt-get purge rhythmbox aisleriot mahjongg thunderbird* |
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
{ | |
"cmd": ["grunt", "develop"], | |
"selector": ["source.js", "source.less", "source.json"], | |
"path": "/usr/bin" | |
} |
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
window.onload = function(e) { | |
alert('hiya'); | |
} |
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
/******* | |
*** Anchor Slider by Cedric Dugas *** | |
*** Http://www.position-absolute.com *** | |
Never have an anchor jumping your content, slide it. | |
Don't forget to put an id to your anchor ! | |
You can use and modify this script for any project you want, but please leave this comment as credit. | |
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 | |
# have submodules been added? | |
MODS=0 | |
# Github base URL | |
GITHUB="https://github.com" | |
# Default branch | |
DEFAULT_BRANCH="3.0/master" |
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
/* | |
function to create the sql for finding the distance between 2 lat/lng pairs | |
*/ | |
//$unit = '6367.45'; | |
//$unit = '3978'; | |
function distance($lat_from, $lng_from, $lat_to, $lng_to, $unit = '3978') { | |
return ‘ROUND($unit * acos(sin(‘.$lat_from.’) * sin(‘.$lat_to.’) + cos(‘.$lat_from.’) * cos(‘.$lat_to.’) * cos(‘.$lng_from.’ - ‘.$lng_to.’)))’; | |
} | |
//Use it like this: |
NewerOlder