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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
# use configuration variables depending on environment | |
http://mindthecode.com/how-to-use-environment-variables-in-your-angular-application/ | |
npm install grunt-ng-constant --save-dev |
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
# check php syntax on every "to be commited" files | |
for f in `git diff --cached --name-only --word-diff=porcelain`;do php -l $f;done; | |
# vim all files that contains a specific pattern | |
vim -p `fgrep -rl "pattern"` |
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
# replacing tabs with spaces | |
ESC+:retab |
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
<?php | |
function lambert93ToWgs84($x, $y){ | |
$x = number_format($x, 10, '.', ''); | |
$y = number_format($y, 10, '.', ''); | |
$b6 = 6378137.0000; | |
$b7 = 298.257222101; | |
$b8 = 1/$b7; | |
$b9 = 2*$b8-$b8*$b8; | |
$b10 = sqrt($b9); | |
$b13 = 3.000000000; |