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/sh | |
# | |
# An example hook script to prepare a packed repository for use over | |
# dumb transports. | |
# | |
echo "--initializing hook--" | |
git --git-dir /var/www/site_name.com/.git --work-tree /var/www/site_name.com pull repo Production |
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
X-Content-Type-Options:nosniff | |
X-Frame-Options:(deny|sameorigin) | |
X-XSS-Protection:1; mode=block | |
# For SSL | |
Strict-Transport-Security: max-age=16070400; includeSubDomains | |
# for images | |
X-Robots-Tag:noindex, nofollow |
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
# BUILD PHP 5.5.15 on Mac OSX 10.9 (A.K.A Mavericks) | |
# @author Adriano Rosa (http://adrianorosa.com) | |
# date 2014-08-05 23:58 | |
# | |
# References: | |
# http://stackoverflow.com/questions/22686284/os-x-mavericks-how-to-upgrade-php-5-4-to-5-5-latest | |
# http://php.net/manual/en/mssql.requirements.php | |
# http://stackoverflow.com/questions/6588174/enabling-postgresql-support-in-php-on-mac-os-x | |
# https://bugs.php.net/bug.php?id=41555 | |
# http://xdebug.org/docs/install |
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
diff --git a/developer/js/module-shorten.js b/developer/js/module-shorten.js | |
index df2e8f8..71f8965 100644 | |
--- a/developer/js/module-shorten.js | |
+++ b/developer/js/module-shorten.js | |
@@ -32,6 +32,11 @@ | |
return; | |
} | |
+ // Skip whether the window is shorten_hash | |
+ if ( el === 'user' && hash ) { |
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
$("body,html").animate({ | |
scrollTop : ( | |
$('div.element:last').offset().top // get the offset of the last element to scrollTo | |
- $('header.navbar').outerHeight() // get the difference whether there is fixed header element | |
+ $('div.element:last').outerHeight() // get the element itself height to make scroolTo be exact under the fixed header | |
) | |
},1500); |
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 | |
# @autor: Adriano Rosa <http://adrianorosa.com> | |
# @file: renames.sh | |
# @description: basic file renamer | |
# @usage: ./renames.sh path/ .html .php | |
criteria=$1 | |
re_match=$2 | |
replace=$3 | |
if [[ $criteria && $re_match && $replace ]]; then |
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
Math.floor(Math.random()*0xFFFFFFFFFFFFFFFF).toString(36); |
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
.directive('bootstrapSwitch', [ | |
function() { | |
return { | |
restrict: 'A', | |
require: '?ngModel', | |
link: function(scope, element, attrs, ngModel) { | |
element.bootstrapSwitch(); | |
element.on('switchChange.bootstrapSwitch', function(event, state) { | |
if (ngModel) { |
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() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
OlderNewer