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
_updateBody: function(str) { | |
/**************************************************************************************************** | |
* This function creates a new document object to be used to parse a HTML string. | |
* | |
*/ | |
var domDocument = document.implementation.createHTMLDocument(); | |
var range = domDocument.createRange(); | |
range.selectNode(domDocument.body); | |
var documentFragment = range.createContextualFragment(str); |
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
function animate(fx) { | |
/**************************************************************************************************** | |
* Animation primer. | |
* The callback function must return false when the animation has to end, true oterwise. | |
* The function inject a time variable in milliseconds. | |
* | |
* https://developer.mozilla.org/en/DOM/window.mozRequestAnimationFrame | |
* http://www.goat1000.com/2011/04/07/mozrequestanimationframe-and-webkitrequestanimationframe.html | |
*/ | |
var aloop; |
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
{ | |
"name": "hello", | |
"version": "0.0.1", | |
"dependencies": { | |
"jade": "*" | |
} | |
} |
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
/* | |
* Google Spreadsheet Custom Functions | |
* Latest Update: 2014-05-05 | |
* | |
* Usage: drop this in a Spreadsheet -> Tools -> Script Editor... | |
* | |
*/ | |
function getJSON(jpath, url) { |
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
// Open a website. Open the Inspector. Got to the Console. Paste the following: | |
// First this | |
(function(){var jQueryVersion="2.1.1";var a=document.createElement("script");a.src="//ajax.googleapis.com/ajax/libs/jquery/"+jQueryVersion+"/jquery.js";a.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(a);})() | |
// Then this (the first one needs time to load) | |
$("*").css("border", "0"); | |
$("*").css("color", "rgba(0,0,0,0)"); | |
$("*").css("background", "rgba(255, 255, 255, 0.1)"); |
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
# Prompt | |
function makeprompt() { | |
# http://bitmote.com/index.php?post/2012/11/19/Using-ANSI-Color-Codes-to-Colorize-Your-Bash-Prompt-on-Linux | |
local TBLUE="\[\e[0;34m\]" | |
local TCYAN="\[\e[0;36m\]" | |
local TLIGHT_CYAN="\[\e[1;36m\]" | |
local TGRAY_DARK="\[\e[1;30m\]" | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return |
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
/* | |
* Google Spreadsheet Custom Functions | |
* Latest Update: 2014-05-05 | |
* | |
* Usage: drop this in a Spreadsheet -> Tools -> Script Editor... | |
* | |
* Then in any cell, use call with this format: | |
* =getJSON("key", "https://public-api.example.com/v1/resource/234") | |
* | |
*/ |
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
### Keybase proof | |
I hereby claim: | |
* I am Folletto on github. | |
* I am folletto (https://keybase.io/folletto) on keybase. | |
* I have a public key whose fingerprint is EC5C 54B7 8897 D3F4 8B83 1801 15C7 2591 8A62 0557 | |
To claim this, I am signing this object: |
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
/** | |
* Simple ring hover animation | |
*/ | |
@mixin menus-hover-halo() { | |
position: relative; | |
&:after { | |
content: ""; | |
pointer-events: none; | |
position: absolute; |
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 | |
/* | |
* Notes: | |
* 1. This isn't an universal function: you might have to add your own db field. | |
* I tried to keep just a few to optimize. | |
* 2. This is a more advanced function from the ones you usually find around, because it | |
* count the number of matching tags to sort the related articles, doesn't just query | |
* and sort for the most recent one with any of the tags. | |
*/ |
OlderNewer