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 postcss = require('postcss'); | |
module.exports = postcss.plugin('postcss-everything-is-important', function () { | |
return function (css) { | |
css.walkDecls(function (decl) { | |
decl.important = true; | |
}); | |
}; | |
}); |
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 lastNDigitsOfPi(n) { | |
return Math.PI.toFixed(Infinity).slice(-n); | |
} |
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 oo(n) { | |
return Object.defineProperties({}, { | |
al: { get: () => 'go' + [...Array(n + 1)].join('o') + 'al' }, | |
o: { get: () => oo(n + 1) } | |
}); | |
} | |
var go = oo(0); | |
console.log(go.al); //=> goal |
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
def ppjson(json) | |
puts _ppjson(json) | |
end | |
def _ppjson(json) | |
json = JSON.parse(json) if json.class == "String" | |
JSON.pretty_generate(json) | |
end | |
class String |
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
class TrueClass | |
def self.setVal(val) | |
$val = val | |
end | |
def <(n) | |
$val < n | |
end | |
end |
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
CREATE TABLE "database" | |
( | |
id serial NOT NULL, | |
name text, | |
CONSTRAINT database_pkey PRIMARY KEY (id) | |
) | |
CREATE TABLE "table" | |
( | |
id serial NOT NULL, |
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 React = require('react'); | |
var Immutable = require('immutable-with-cursors'); | |
var mainComponent = React.createClass({ | |
getInitialState: function() { | |
return this.props; | |
}, | |
render: function() { | |
return React.DOM.ul( | |
null, |
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
quicksort :: Ord a => [a] -> [a] | |
quicksort [] = [] | |
quicksort (pivot:rest) = (quicksort smaller) ++ [pivot] ++ (quicksort greater) | |
where | |
smaller = filter (<= pivot) rest | |
greater = filter (> pivot) rest | |
merge :: Ord a => [a] -> [a] -> [a] | |
merge [] [] = [] |
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($) { | |
$.fn.delayLink = function(fn, options) { | |
var settings = $.extend(options, { | |
timeout: 100 | |
}); | |
$(this).on('click', function(e) { | |
e.preventDefault(); | |
var went = false; | |
var link = this; | |
var go = 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
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 |
NewerOlder