I hereby claim:
- I am benjamine on github.
- I am beneidel (https://keybase.io/beneidel) on keybase.
- I have a public key ASC4nFm8k2A6h7skCx7s_w2yfOWFrM_vwIPnJrGYSYk-5Ao
To claim this, I am signing this object:
class Trie { | |
head = { | |
key: "", | |
children: {} | |
}; | |
add(key) { | |
var curNode = this.head, | |
newNode = null, | |
curChar = key.slice(0, 1); |
function Trie() { | |
this.head = { | |
key : '' | |
, children: {} | |
} | |
} | |
Trie.prototype.add = function(key) { | |
var curNode = this.head |
#!/usr/bin/env node | |
/* | |
Requirements: | |
- node v8.9.3+ | |
- npm install mongodb | |
- npm install p-queue | |
*/ | |
const PQueue = require('p-queue'); | |
const mongodb = require('mongodb'); |
I hereby claim:
To claim this, I am signing this object:
// ==UserScript== | |
// @name GithubMarkdownDiffRichify | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description enhances markdown diffs in github, makes links clickable and embeds images (only images in the repo) | |
// @author https://github.com/benjamine | |
// @match https://github.com/*/pull/* | |
// @match https://github.com/*/compare/* | |
// @match https://github.com/*/commit/* | |
// @grant none |
#!/bin/sh | |
# brew install ffmpeg | |
ffmpeg -thread_queue_size 50 \ | |
-f avfoundation -framerate 30 -i "1" \ | |
-thread_queue_size 50 -f avfoundation -framerate 30 -video_size 640x480 -i "0" \ | |
-c:v libx264 -crf 18 -preset ultrafast \ | |
-filter_complex 'overlay=main_w-overlay_w-10:main_h-overlay_h-10' -r 30 screen-capture.mkv |
/* | |
<style type="text/css"> | |
#grid { | |
display: none; | |
position: fixed; | |
top: 0; | |
left: 0; | |
height: 100%; | |
width: 100%; |
this is a preview of a page object model that works independently of the browser driver.
page and component object define a hierarchy, and each of this objects expose a .s
property that has an absolute css selector to find the element (eg. using document.querySelector
),
the way that property is built is by space-concatenating the css selectors of it's ancestors.
var page = this.page('checkout');
// page.orderConfirmation.purchase.s === ['#main .order-confirmation', 'button.purchase-btn'].join(' ')
browserDriver.click(page.orderReview.purchase.s);
itsProgrammersDay=((j1=new Date()).setMonth(0, 0),Math.round((new Date()-j1)/8.64e7)===Math.pow(2, 8)); |
function sort(s) { return s.split('').sort().join(''); } | |
sort("eleven plus two") === sort("twelve plus one"); |