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
jQuery(function(){ | |
var link = [ | |
"Home", | |
"About us", | |
"Contact us" | |
]; | |
var icon = [ | |
"home", | |
"user", | |
"envelope" |
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
/** | |
* Debouncer function to prevent multiple calls from a repeatedly called event | |
* @link http://stackoverflow.com/a/4298672/187954 | |
* @link https://gist.github.com/3649866 | |
* @param {Function} callback A callback to execute when timeout is reached with no subsequent calls. | |
* @param {Integer|null} timeout A custom timeout or null for 200 | |
* @return {Function} The debouncer function. | |
*/ | |
function eventDebouncer(callback, timeout) { | |
timeout = timeout || 200; |
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
<form action="" method="post"> | |
<input type="text" name="name" /> | |
<button type="submit">Submit</button> | |
</form> | |
<div id="result"></div> | |
<script type="src/javascript"> | |
$.ajax({ | |
type: 'POST', | |
url: location.href, |
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
[ | |
'Afghanistan', 'Albania', 'Algeria', 'American Samoa' , 'Andorra', 'Angola', 'Anguilla', | |
'Antarctica', 'Antigua and Barbuda', 'Antilles, Netherlands', 'Argentina', 'Armenia', | |
'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', | |
'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda' , 'Bhutan', 'Bolivia', | |
'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'British Indian Ocean Territory', | |
'British Virgin Islands' , 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', | |
'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands' , 'Central African Republic', | |
'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', | |
'Comoros', 'Congo', 'Cook Islands', 'Costa Rica', 'Cote D\'Ivoire', 'Croatia', 'Cuba', |
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
ModPagespeed on | |
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html | |
ModPagespeedFileCachePath "/var/mod_pagespeed/www.website.com/cache/" | |
ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/www.website.com/cache/" | |
ModPagespeedEnableFilters combine_css,rewrite_css,inline_css | |
ModPagespeedEnableFilters combine_javascript,rewrite_javascript,inline_javascript | |
ModPagespeedEnableFilters extend_cache | |
ModPagespeedEnableFilters inline_images,recompress_images,resize_images |
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
HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install ekg2 2>&1 ⏎ | |
==> Downloading http://pl.ekg2.org/ekg2-0.3.1.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/ekg2-0.3.1.tar.gz | |
tar xf /Library/Caches/Homebrew/ekg2-0.3.1.tar.gz | |
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/ekg2/0.3.1 --without-python --without-perl --with-readline=/usr/local/Cellar/readline/6.2.4 --without-gtk --enable-unicode false | |
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/ekg2/0.3.1 --without-python --without-perl --with-readline=/usr/local/Cellar/readline/6.2.4 --without-gtk --enable-unicode false | |
configure: WARNING: you should use --build, --host, --target | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-saf |
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 | |
if [ $# != 4 ]; then | |
echo "Usage: $0 <database_name> <new_database_name> <mysql_username> <mysql_password>" | |
exit 1; | |
fi | |
DATABASE_NAME=$1 | |
NEW_DATABASE_NAME=$2 | |
USERNAME=$3 | |
PASSWORD=$4 |
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
for X in $(du -s * | sort -nr | cut -f 2); do du -hs $X ; done | head -n 20 |
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 | |
# MySQL executables | |
MYSQL="/usr/bin/mysql" | |
MYSQLDUMP="/usr/bin/mysqldump" | |
# Other executables | |
GZIP="$(which gzip)" | |
# Validate arguments |
OlderNewer