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 counter = 0; | |
var n_calls = function () { | |
console.log("This function was called ", ++counter, " times"); | |
}; | |
n_calls(); // This function was called 1 times | |
n_calls(); // This function was called 2 times | |
n_calls(); // This function was called 3 times |
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
<!-- Embedding flash --> | |
<!-- | |
Let's say you want to include a youtube video. | |
The classic code is something like that: | |
--> | |
<object width="560" height="349"> | |
<param name="movie" value="https://www.youtube-nocookie.com/v/QFCSXr6qnv4?fs=1&hl=en_US&rel=0"></param> | |
<param name="allowFullScreen" value="true"></param> |
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:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){nb_lols=0;midu=null; | |
$(document).ready(function(){$.fn.makeColor=function(){colors=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];color="#";for(i=0;i<6;)j=Math.floor(Math.random()*15),color+=colors[j],i+=1;return color};$.fn.makeP=function(){return p=$("<p></p>").css("color",$.fn.makeColor()).css("display","inline-block").css("font-weight","bold").css("padding","3px").css("position","fixed").css("z-index","1500")};$.fn.makeLol=function(){lol=$.fn.makeP();lol.html("lol").css("font-size",Math.floor(Math.random()* | |
20)+30+"px").css("left","-5%");return lol};$.fn. |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC 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
127.0.0.1 home.dev | |
127.0.0.1 platform.dev | |
127.0.0.1 challenges.dev | |
127.0.0.1 challengepostcom.platform.dev | |
127.0.0.1 challengegov.platform.dev | |
127.0.0.1 freethetvchallengecom.platform.dev | |
127.0.0.1 bigappideas.challenges.dev | |
127.0.0.1 lollacom.challenges.dev | |
127.0.0.1 presidentcom.challenges.dev |
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
<iframe width="615" height="375" src="http://www.youtube.com/embed/QH2-TGUlwu4?rel=0&wmode=opaque" frameborder="0" allowfullscreen></iframe> | |
<!-- throws: | |
SCRIPT16385: Not implemented | |
www-embed_core_module-vfl_M4tJV.js, line 115 character 248 | |
!> |
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
(function($){ | |
var current, | |
rnamespaces = /\.(.*)$/, | |
returnFalse = function(){return false}, | |
returnTrue = function(){return true}; | |
/** | |
* @function |
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
FILES_PATTERN='\.(js|coffee)(\..+)?$' | |
FORBIDDEN='console.log' | |
git diff --cached --name-only | grep -E $FILES_PATTERN | GREP_COLOR='4;5;37;41' xargs grep --color --with-filename -n $FORBIDDEN && echo 'COMMIT REJECTED Found "console.log" references in your javascript. Please remove them before commiting'; | |
# my zsh does annoying things with ! | |
[ $? -ne 0 ] |
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
127.0.0.1 - - [21/Nov/2011:17:36:13 -0500] "DELETE /manage/groups/110/tags/130 HTTP/1.1" 302 140 "http://platform.dev/manage/groups/110" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.938.0 Safari/535.8" "-" | |
127.0.0.1 - - [21/Nov/2011:17:36:14 -0500] "DELETE /manage/groups/110 HTTP/1.1" 302 140 "http://platform.dev/manage/groups/110" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.938.0 Safari/535.8" "-" | |
127.0.0.1 - - [21/Nov/2011:17:36:15 -0500] "DELETE /manage/groups/109 HTTP/1.1" 503 5 "http://platform.dev/manage/groups/110" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.938.0 Safari/535.8" "-" |
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
if (window.location.hash.match(/#notes/)) { | |
$('#tb-note span.ir').click(); | |
} |