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
var pages = 50; | |
var pager = [ | |
'CODE:', | |
'EVENT TYPE=CLICK SELECTOR="#browsecontent>center>span:nth-of-type(3)"', | |
'WAIT SECONDS=3' | |
].join('\n'); | |
var page = [ | |
'CODE:', |
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 pointInPoly = (poly, point) => { | |
let inside = false; | |
let intersect = false; | |
let [x, y] = point; | |
let j = poly.length - 1; | |
poly.forEach((pp, i) => { | |
let [xi, yi] = pp; | |
let [xj, yj] = poly[j]; | |
intersect = ((yi > y) != (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi); | |
if (intersect) { |
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
var curry = function (fn) { | |
var args = Array.prototype.slice.call(arguments); | |
// If the curried function has enough arguments to run | |
// just cut out the first one which is the function itself | |
// and call it with the rest (all the arguments it needs) | |
if (args.length - 1 >= fn.length) return fn.apply(this, args.slice(1)); | |
// If there are not enough arguments just return a function waiting for the rest | |
return function () { | |
return curry.apply(this, args.concat.apply(args, arguments)); | |
}; |
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
var compose = function () { | |
return Array.prototype.slice.call(arguments).reduce(function (f, g) { | |
return function () { | |
return f(g.apply(null, Array.prototype.slice.call(arguments))); | |
}; | |
}); | |
} |
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 range = (from, to) => [for (i of Array(to).keys()) from + i]; |
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
# git please | |
# checks that your local copy of the ref that you’re overwriting is up-to-date before overwriting it. | |
# This indicates that you’ve at least fetched the changes you’re about to stomp. | |
git config --global alias.please 'push --force-with-lease' | |
# git commend | |
# quietly tacks any staged files onto the last commit you created, re-using your existing commit message | |
git config --global alias.commend 'commit --amend --no-edit' | |
# git it |
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
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300); | |
@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300); | |
@keyframes a { | |
0% { | |
transform: rotate(0deg) | |
} | |
to { | |
transform: rotate(1turn) | |
} | |
} |
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
[color] | |
status = auto | |
diff = auto | |
branch = auto | |
interactive = auto | |
ui = true | |
[alias] | |
amend = !"git commit --amend -C HEAD" | |
s = status | |
a = add -A |
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
module Main exposing (..) | |
import Html exposing (Html, button, div, text) | |
import Html.Events exposing (onClick) | |
main : Program Never Model Msg | |
main = | |
Html.beginnerProgram { model = model, view = view, update = update } |
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
module Main exposing (..) | |
import Html exposing (Html, Attribute, div, input, text) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput) | |
main : Program Never Model Msg | |
main = | |
Html.beginnerProgram { model = model, view = view, update = update } |
OlderNewer