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
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) { | |
var data = originalOptions.data; | |
if( data && data.action === 'ab_session_save' && data.time_from) { | |
options.data = $.param($.extend(originalOptions.data||{}, { | |
make: $('#'+$options.makeId).find("option:selected").text(), | |
model: $('#'+$options.modelId).find("option:selected").text(), | |
version: $('#'+$options.versionId).find("option:selected").text() | |
})); | |
} |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
git log --oneline $(git rev-list $TAG | head -n 1)..HEAD | sed '/Merge remote-tracking/d' |
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
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] |
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 USER 'newuser'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; | |
FLUSH PRIVILEGES; |
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
echo -e "Host bitbucket.org\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config |
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 | |
/** | |
* Stores a value and calls any existing function with this value. | |
*/ | |
class FilterStorage | |
{ | |
/** | |
* Filled by __construct(). Used by __call(). | |
* | |
* @type mixed Any type you need. |
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 toggleFacet = { | |
init: function (options, elem) { | |
this.options = $.extend({}, this.options, options); | |
this.$elem = $(elem); | |
this.eventify(); | |
}, | |
options: { | |
toggleClass: 'facet-collapsed' |
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
<div id="main-region"> | |
<p>This is static</p> | |
</div> | |
<script type="text/template" id="static-template"> | |
<p> This is a text rendered by our Marionette App. </p> | |
</script> |
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
def hello | |
puts "hello" | |
end |
OlderNewer