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
jQuery(".entry-meta>a:eq(1)").before('<span class="show-conversation"> + </span>'); | |
jQuery("span.show-conversation").live('click', function(){var show=jQuery(this),status=show.parents('.status').eq(0),target=show.next('a').attr('href'); | |
jQuery.get(target, function(data){var body=jQuery(data);var author=body.find('a.screen-name');body=body.find('span.status-body');body.find('span.status-content').prepend(']').prepend(author).prepend('[');body.css({borderTop: "1px solid #EEEEEE", padding: "5px"});body.find(".entry-meta>a:eq(1)").before('<span class="show-conversation"> + </span>');status.prepend(body.parent().html());});}); |
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
Source: http://theoks.net/blog/2008/04/25/funny-quips/ | |
* BSD is for people who love UNIX. Linux is for those who hate Microsoft. | |
* “XML is like violence: if it doesn’t solve your problem, you aren’t using enough of it.” – Chris Maden | |
* UNIX is user friendly, it just picks its friends carefully. | |
* Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, In kernel as it is in user! | |
* UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. – Dennis Ritchie | |
* “Black holes are where God divided by zero.” | |
* How to make COBOL a great language? Remove “OBOL”. | |
* How to make COBOL a great language? Select “COBO” then Type “Per”. |
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
# I usually get french and english emails, and would like to auto-detect the language | |
# to set the spellchecker when answering. | |
# (I use mutt and vim) | |
# In .muttrc: | |
set editor = 'bash ~/bin/spelledit.sh' | |
# and my ~/bin/spelledit.sh | |
vim + -c "setlocal spell spelllang=$([ `cat $1 | aspell -l en list | sort -u | wc -l` -lt `cat $1 | aspell -l fr list | sort -u | wc -l` ] && echo "en" || echo "fr") encoding=utf-8" $1 | |
# Yes, this is dirty: I call aspell twice on the file, | |
# counting the number of bad words in french and english, | |
# and set spelllang to the lang with the less bad words |
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
javascript:Array.prototype.forEach.call(document.querySelectorAll('link[rel=shortlink]'),function(e){window.alert(e.getAttribute('href'));}) |
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
/** | |
* USE AT YOUR OWN RISK !!! | |
* | |
* In about:config set devtools.chrome.enabled to true; | |
* Open the Scratchpad, select Environment / Browser and run this script | |
* | |
* DON'T forget to then switch back Environment to Content and devtools.chrome.enabled to false | |
* | |
* @see http://mxr.mozilla.org/mozilla-central/source/browser/devtools/responsivedesign/responsivedesign.jsm#39 | |
*/ |
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
var items = document.getItems(); | |
if (items.length > 0) { | |
Array.prototype.forEach.call(items, function (elmt) { | |
console.log(elmt); | |
console.log(elmt.itemId, elmt.itemProp.value, elmt.itemRef.value, elmt.itemType.value, elmt.itemValue); | |
Array.prototype.forEach.call(elmt.properties, function (prop) { | |
console.log(' ⇒ ' + prop.itemProp.value + ' : ' + (prop.content || prop.itemValue), prop); | |
}) | |
}) | |
} |
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
<html lang="fr" > | |
<head prefix="doap: http://usefulinc.com/ns/doap#"> | |
<title>Saisis un ticket ! Oussa ???</title> | |
<meta charset="utf-8" /> | |
<meta name="description" content="Esquisses, brouillons et notes en vrac d'un apprenti geek intéressé par la liberté" /> | |
<meta name="author" content="Clochix" /> | |
<meta property="doap:bug-database" content="https://github.com/clochix/esquisses/issues"> | |
</head> | |
<body> | |
(…) |
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
# commit file toto 12 hours ago | |
GIT_COMMITTER_DATE="`date -R --date='12 hours ago'`" bash -c 'git commit --date "$GIT_COMMITTER_DATE" foo' |
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
// Clone an object | |
// @see https://developer.mozilla.org/en-US/docs/Differential_inheritance_in_JavaScript | |
Object.prototype.clone = function(){ | |
// Extract the prototype from the "this" object | |
var p = Object.getPrototypeOf(this); | |
// Create a new object with p as its prototype | |
return Object.create(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
// Get a node whose content starts with (optional spaces) "Doing" | |
// Available functions : https://developer.mozilla.org/en-US/docs/XPath/Functions | |
// (regex with matches are not available, XPath 2.0, only normalized still 2007 :S ) | |
evaluation = document.evaluate("//*[starts-with(normalize-space(.), 'Doing')]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue | |
evaluation = document.evaluate("//h2[contains(., 'part')]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue |
OlderNewer