I hereby claim:
- I am techieshark on github.
- I am techieshark (https://keybase.io/techieshark) on keybase.
- I have a public key ASAGfHHdWMNLxRSipw5fj5uzzNELExUqoXtBuY0RPYw41go
To claim this, I am signing this object:
// @flow | |
// Flow-typed version of Object.values() | |
// @see: problem - https://github.com/facebook/flow/issues/2221 | |
// @see: this solution - https://stackoverflow.com/a/51757027/1024811 | |
export default function objectValues<A, B>(obj: {[key: A]: B}): Array<B> { | |
return ((Object.values(obj): any): Array<B>); | |
} |
// @flow | |
/** | |
* Returns new object made of the picked paths. | |
* Native implementation of lodash `pick`. | |
* Shaves 1-2kb off download size: https://bundlephobia.com/result?p=lodash.pick@4.4.0. | |
* @see https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_pick | |
* @see https://lodash.com/docs/#pick | |
* @return {Object} | |
*/ |
// For quickly trying things out in the browser, jQuery and Lo-Dash (like Underscore.js) are great. | |
// Read the code below (never copy & paste code you don't trust), | |
// then you can copy & paste it into the browser console to load jQuery & lodash. | |
(function () { | |
var jq = document.createElement('script'); | |
jq.src = 'https://code.jquery.com/jquery-2.1.4.js'; |
/** | |
* Remove a CSS class from an HTML element. | |
* @param {HTMLElement} el The HTML element to modify. | |
* @param {string} className The class to remove. | |
* @returns null | |
* @see http://youmightnotneedjquery.com/#remove_class | |
*/ | |
function removeClass(el, className) { | |
if (el.classList) | |
el.classList.remove(className); |
I hereby claim:
To claim this, I am signing this object:
# Contributor License Agreement | |
The following terms are used throughout this agreement: | |
* You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it. | |
* Project - School Finder project located at https://github.com/CodeforAustralia/school-finder | |
* Contribution - any type of work that is submitted to a Project, including any modifications or additions to existing work. | |
* Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with GitHub, Code for Australia, Peter W, contributors or maintainers. | |
1. Grant of Copyright License. |
open -a "/Applications/Google Chrome.app" 'https://grist.org/politics/trumps-environmental-assault-continues-and-now-hell-have-pruitt-as-a-henchman/' --args --enable-dom-distiller | |
# Now go to Menu -> Distill Page (on an article page, like the example above) |
[ | |
{ | |
"name": "Data", | |
"comment": "Data module overview.\n\n#Single items\n\n\n@docs getItem\n\n", | |
"aliases": [], | |
"types": [], | |
"values": [ | |
{ | |
"name": "getItem", | |
"comment": "Get item from app data store.", |
# want to quickly see how large (in bytes) a file is after we gzip it, without actually gzipping it | |
# on command line, running the following does the trick: gzip -c file.js | wc -c | |
# we can add this little bit to our .bashrc so we can instead just type gsize file.js | |
gzipSize() { | |
gzip -c $1 | wc -c | |
} | |
alias gsize=gzipSize |
# Git | |
alias ga='git add' | |
alias gbs='git bisect' | |
alias gbl='git blame' | |
alias gb='git branch' | |
alias gco='git checkout' | |
alias gc='git commit' | |
alias gcl='git clone' | |
alias gcp='git cherry-pick' | |
alias gd='git diff' |