made with esnextbin
- Home: https://zeit.co/
- Home: http://electron.atom.io/
- Dribbble: https://dribbble.com/github
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
{ | |
"title": "General Browser Error Schema", | |
"type": "object", | |
"properties": { | |
"source": { | |
"type": "string" | |
}, | |
"message": { | |
"type": "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
// ==UserScript== | |
// @name Youtube Screenshot Button | |
// @description Adds a button that lets you take screenshot. | |
// @homepageURL https://gist.github.com/amio/785a9eba8e58af1ddba7623613cfbc10 | |
// @author Amio | |
// @version 1.0.0 | |
// @date 2016-07-09 | |
// @include http://www.youtube.com/* | |
// @include https://www.youtube.com/* | |
// @exclude http://www.youtube.com/embed/* |
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
// Usage: | |
// | |
// var onScroll = traf(function () { | |
// item[0].style.width = window.scrollY + 100 + 'px'; | |
// }) | |
// window.addEventListener('scroll', onScroll, false); | |
export default function traf (fn) { | |
var ticking = false; | |
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
// Generate emoji.json from | |
// http://unicode.org/emoji/charts/full-emoji-list.html | |
{ | |
const ids = $$('td.rchars') | |
const trs = ids.map(e => e.parentElement) | |
const db = trs.map(tr => { | |
const tds = tr.getElementsByTagName('td') | |
return { | |
no: tds[0].innerText, |
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
$('a[action-type=batselect]').click() | |
$$('.member_wrap').map(x => x.click()) | |
$('a[action-type=cancel_follow_all]').click() | |
$('a[action-type=ok]').click() |
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
#!/bin/bash | |
source_dir=$1; | |
find "$1" -type f -name "*.pdf" -print0|while read -d $'\0' file; | |
do | |
if [ `strings "$file"|grep -c "www.it-ebooks.info"` -gt 0 ]; | |
then | |
echo "$file"; | |
cp "$file" /tmp/1.pdf; | |
script=$(cat <<'EOF' | |
use strict; |
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
// 1. fn's last argument should be a callback | |
// 2. the syncified function returns an array, which is the arguments for that callback. | |
function syncify (fn) { | |
let doing = true | |
return function (...args) { | |
let result = undefined | |
fn(...args, (...callbackArgs) => { | |
result = callbackArgs | |
doing = false | |
}) |