Skip to content

Instantly share code, notes, and snippets.

// see: http://coenraets.org/blog/2012/03/using-backbone-js-with-jquery-mobile/
// for context.
// this modifies original code (above) to also watch for dialogs being hidden
$('div[data-role="page"],div[data-role="dialog"]').live('pagehide', function (event, ui) {
$(event.currentTarget).remove();
});
<?php
/**
* Changelog Markdown
*
* This is a script to transform GIT LOG into a cute format Changelog.md
*
* To use, set executable permissions to this file and execute:
* $ php changelog.php > CHANGELOG.md
*
* Copyright (c) 2013 João Pinto Neto
password
123456
12345678
1234
qwerty
12345
dragon
pussy
baseball
football
<script type="text/javascript">
var getUrlParams = function() {
var params = {}, hash;
var hashes = decodeURI(window.location.href).replace(/\+/g," ").slice(window.location.href.indexOf('?') + 1).split('&');
for (var i=0; i<hashes.length; i++) {
hash = hashes[i].split('=');
params[hash[0]] = hash[1];
}
return params;
};
@iloris
iloris / htaccess
Created June 13, 2012 22:21 — forked from parvez/htaccess
Force HTTPS with Rewrite Rule
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://www.mydomain.com%{REQUEST_URI} [L,R]
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^.*$ https://www.mydomain.com%{REQUEST_URI} [L,R]