made with esnextbin
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
#First released as C++ program by Hiroyuki Tsutsumi as part of the free software suite “Beer” | |
#I thought porting it to Python could be both a challenge and useful | |
from sys import argv, exit, getsizeof | |
from struct import pack_into, unpack_from | |
def ceil4(n): |
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
cover(width = inherit, height = inherit, min-width = 100%, min-height = 100%) | |
// Chrome, Safari | |
@media screen and (-webkit-min-device-pixel-ratio: 0) | |
object-fit cover | |
height height | |
width width | |
// Firefox | |
@-moz-document url-prefix() | |
& | |
object-fit cover |
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
'use strict'; | |
var React = require('react'); | |
var P = React.PropTypes; | |
var PureRenderMixin = require('react/lib/ReactComponentWithPureRenderMixin'); | |
var Waypoints; | |
if (typeof window !== 'undefined') { | |
Waypoints = require('waypoints/lib/noframework.waypoints'); | |
Waypoints.Inview = require('waypoints/lib/shortcuts/inview'); |
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
irb(main):007:0> class Numeric | |
irb(main):008:1> def reverse | |
irb(main):009:2> self.class | |
irb(main):010:2> end | |
irb(main):011:1> end | |
=> :reverse | |
irb(main):012:0> 2.reverse | |
=> Fixnum |
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
'use strict'; | |
var ResizeMixin, raf; | |
if (typeof window === 'undefined') { | |
ResizeMixin = {}; | |
} | |
else { | |
raf = require('raf'); | |
ResizeMixin = { |
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
#!/usr/bin/env bash | |
for sha in `git rev-list HEAD..$1`; do | |
clear | |
git show --color $sha | less -XE | |
echo | |
while true; do | |
read -p "Do you wish to use this commit (y/n/q) ? " answer | |
case $answer in | |
[Yy]* ) git cherry-pick $sha;; |
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
'use strict'; | |
var publicPath = require('./static_path')(process.env.PUBLIC_PATH); // e.g. PUBLIC_PATH=https://static%d.domain.com/ | |
module.exports = publicPath; |
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
// @flow | |
class SuperClass { | |
something () { | |
} | |
} | |
class SubClass extends SuperClass { | |
} |
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
'use strict'; | |
import Promise from 'bluebird'; | |
import { | |
zonifyCall, | |
zonifyCatch, | |
zonifyCoroutine, | |
zonifyFirst, | |
zonifyLast, | |
zonifyMiddle, |