- Rails: https://github.com/rails/pjax_rails
- Django: https://github.com/jacobian/django-pjax
- Asp.Net MVC3: http://biasecurities.com/blog/2011/using-pjax-with-asp-net-mvc3/
- FuelPHP: https://github.com/rcrowe/fuel-pjax
- Grails: http://www.bobbywarner.com/2012/04/23/add-some-pjax-to-grails/
- Express: https://github.com/abdelsaid/express-pjax-demo
This file contains hidden or 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
| /*--- checkForBadJavascripts() | |
| This is a utility function, meant to be used inside a Greasemonkey script that | |
| has the "@run-at document-start" directive set. | |
| It Checks for and deletes or replaces specific <script> tags. | |
| */ | |
| function checkForBadJavascripts (controlArray) { | |
| /*--- Note that this is a self-initializing function. The controlArray | |
| parameter is only active for the FIRST call. After that, it is an | |
| event listener. |
This file contains hidden or 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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>An American Flag Made with CSS</title> | |
| <meta name="author" content="Jay Robinson, http://jayrobinson.org"> | |
| <style type="text/css"> |
This file contains hidden or 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
| CmdUtils.makeBookmarkletCommand({ | |
| name: "Evernote", | |
| description: "Save a note on Evernote.", | |
| icon: "http://www.evernote.com/favicon.ico", | |
| homepage: "http://www.makadia.com", | |
| author: {name: "Svapan Makadia", email: "codewzrd@hotmail.com"}, | |
| help: "Select content and invoke this command to save the selection as a note or just save the whole page without selecting anything.", | |
| url: "javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var%20x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new%20Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();" | |
| }) |
This file contains hidden or 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 slugify($str) { | |
| $search = array('Ș', 'Ț', 'ş', 'ţ', 'Ş', 'Ţ', 'ș', 'ț', 'î', 'â', 'ă', 'Î', 'Â', 'Ă', 'ë', 'Ë'); | |
| $replace = array('s', 't', 's', 't', 's', 't', 's', 't', 'i', 'a', 'a', 'i', 'a', 'a', 'e', 'E'); | |
| $str = str_ireplace($search, $replace, strtolower(trim($str))); | |
| $str = preg_replace('/[^\w\d\-\ ]/', '', $str); | |
| $str = str_replace(' ', '-', $str); | |
| return preg_replace('/\-{2,}', '-', $str); | |
| } |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |
This file contains hidden or 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
| // gruntfile dropin used to build a grunt files object with 1:1 structure | |
| function globToMultiFiles(glob, dest, options) { | |
| var path = require('path'); | |
| grunt.util = grunt.util || grunt.utils; | |
| dest = grunt.template.process(dest); | |
| options = grunt.util._.defaults(options || {}, { | |
| cwd: '', |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title><picture> with different fallbacks</title> | |
| </head> | |
| <body> | |
| <h1><picture> with different fallbacks</h1> | |
| <p>Don't forget to check which resources are loaded, regardless of what is displayed.</p> |
This file contains hidden or 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
| /** | |
| * Add dataset support to elements | |
| * No globals, no overriding prototype with non-standard methods, | |
| * handles CamelCase properly, attempts to use standard | |
| * Object.defineProperty() (and Function bind()) methods, | |
| * falls back to native implementation when existing | |
| * Inspired by http://code.eligrey.com/html5/dataset/ | |
| * (via https://github.com/adalgiso/html5-dataset/blob/master/html5-dataset.js ) | |
| * Depends on Function.bind and Object.defineProperty/Object.getOwnPropertyDescriptor (polyfills below) | |
| * All code below is Licensed under the X11/MIT License |
This file contains hidden or 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
| CmdUtils.makeBookmarkletCommand({ | |
| name: "Evernote", | |
| description: "Save a note on Evernote.", | |
| icon: "http://www.evernote.com/favicon.ico", | |
| homepage: "http://www.makadia.com", | |
| author: {name: "Svapan Makadia", email: "codewzrd@hotmail.com"}, | |
| help: "Select content and invoke this command to save the selection as a note or just save the whole page without selecting anything.", | |
| url: "javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var%20x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new%20Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();" | |
| }) |