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
// ==UserScript== | |
// @name Github news feed minimizer | |
// @namespace evaryont.me | |
// @include https://github.com/ | |
// @include https://github.com/dashboard/yours | |
// @datecreated 2010-04-22 | |
// @version 0.1 | |
// @author Colin 'Evaryont' Shea | |
// @license MIT | |
// @description Do many little things, but overall, make the whole page a lot better. |
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
//#define ?? auto | |
#define cease break | |
#define upon case | |
//#define ?? char | |
#define steadfast const | |
#define abide continue | |
//#define ?? default | |
#define undertake do | |
//#define ?? double | |
#define otherwise else |
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
freq = 770; len = 10; rate = 44100; vol = 1.0; | |
start = new Date(); | |
w = ''; | |
phase = 0; | |
sin = Math.sin; | |
chr = String.fromCharCode; | |
total = len*rate; |
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
# Add some useful features to array prototypes | |
Array::fold = (initial, fn) -> initial = fn initial, x for x in @; initial | |
Array::sum = -> @fold 0, (memo, i) -> memo + i | |
Array::mean = -> @sum() / @length | |
Array::max = -> Math.max.apply {}, @ | |
Array::min = -> Math.min.apply {}, @ | |
Array::median = -> if @length % 2 is 0 then (@[@length/2-1]+@[@length/2])/2 else @[Math.ceil @length/2] | |
Array::variance = -> avg = @mean(); @fold(0, (memo, i) -> memo + Math.pow i-avg, 2) / @length | |
Array::std_dev = -> Math.sqrt @variance() |
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
$(document).ready(function(){ | |
$(".disappear").click(function(){ | |
$("#row20").animate({ "opacity": "0" }, | |
100, | |
function(){$("#row19").animate({ "opacity": "0" }, | |
100, | |
function(){$("#row18").animate({ "opacity": "0" }, | |
100, | |
function(){$("#row17").animate({ "opacity": "0" }, | |
100, |
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
/* Font Awesome | |
the iconic font designed for use with Twitter Bootstrap | |
------------------------------------------------------- | |
The full suite of pictographic icons, examples, and documentation | |
can be found at: http://fortawesome.github.com/Font-Awesome/ | |
License | |
------------------------------------------------------- | |
The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0: | |
http://creativecommons.org/licenses/by/3.0/ A mention of |
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
= 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
_={_=_G}for--[[]]__--[[]]in(next),_["_"]do(_)[_]=(__)_[#_[_]],_[_[_]:byte(-#"#" | |
)+#_[_]-(#{}+#"(#''"*#"*#*#*"*#"_[_[]]")]=_[_],_[_]end(_)[_]=_._[_[#""]]{[_._[_ | |
[#""]]]=_}_[""]=_._[_._[_[#[=[=#=]=]*-((#[=[#[=]#]=]))]](_._[_[-#[[_[-#[#_[_]]] | |
](_))]_[";"]=_._[_[#"#"+(#")#^")^#"#^"]]_["'"]=[[sub]]_['"']=_[""][_["'"]]_["/" | |
]=[[/_)=.,[#"('*:^;+]]_["'"]=_[""][_['"'](_[-#[[=[=]=]]],-#",_",-#"..").._["'"] | |
]_["["]=_['"'](_[-#"#-]_"],#",",#{_}).._['"'](_[-#"-"],#",",#"#").._['"'](_[-(# | |
"^#^")^#"^#"],#"-",#"(").._['"'](_[#_[-#"#"]*-#"[#"],#_[-#"#"],#_[-#"#"]).._['' | |
..'"'](_[-#[[=[]=]]],#_["/"]/#_["/"],#"/").._['"'](_[-(#"#)-")^#[[""]]],-#"-,", | |
-#[=[[]]=])_["]"]=_['"'](_[-#_[-#"-"]],#",",#"#").._[";"](_["["]..[=[('\]=]..(# | |
'#).'*#',..]]'*#'",#"#",'-#'(').."')")().._['"'](_[-#_[-#"-"]],-#_[-#"-"]-#"-", |
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
const countToThree = { | |
a: 1, | |
b: 2, | |
c: 3 | |
}; | |
countToThree[Symbol.iterator] = function* () { | |
const keys = Object.keys(this); | |
const length = keys.length; |
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
/* | |
* Task: Parse even numbers in PEG.js (http://pegjs.majda.cz). | |
* | |
* Solution: Let's parse all numbers and reject odd ones using a semantic | |
* predicate -- an arbitrary piece of code that returns true (meaning "continue | |
* parsing") or false (meaning "halt parsing"). | |
* | |
* This solution wouldn't work before commit a2af1fe612 because predicates | |
* didn't have access to labeled expressions in the grammar as variables | |
* (without ugly workarounds). But they have the access now and the solution |
OlderNewer