I hereby claim:
- I am pstjean on github.
- I am pstjean (https://keybase.io/pstjean) on keybase.
- I have a public key whose fingerprint is 0D53 110C 83D2 C131 3226 1494 7979 B907 A88B 863E
To claim this, I am signing this object:
document.addEventListener('DOMContentLoaded', function(){ | |
var gfyVid = document.getElementsByClassName('gfyVid')[0]; | |
gfyVid.setAttribute('width','600px'); | |
gfyVid.setAttribute('height','337px'); | |
gfyContainer = gfyVid.parentNode; | |
var controls = gfyContainer.childNodes; | |
for(var control in controls) { | |
if(controls[control] instanceof HTMLElement) { | |
if(!controls[control].classList.contains("gfyVid")) { | |
gfyContainer.removeChild(controls[control]); |
# IntelliJ Files | |
.idea/ | |
*.iml | |
*.iws | |
# Vim Files | |
*~ | |
*.swp | |
*.swo |
import simplejson | |
import sqlalchemy | |
from sqlalchemy import String | |
from sqlalchemy.ext.mutable import Mutable | |
class JSONEncodedObj(sqlalchemy.types.TypeDecorator): | |
"""Represents an immutable structure as a json-encoded string.""" | |
impl = String |
/* | |
Solarized-ish theme for JSONView | |
https://github.com/gildas-lormeau/JSONView-for-Chrome | |
*/ | |
body { | |
white-space: pre; | |
font-family: monospace; | |
background-color: #002b36; | |
color: #839496; |
# Trim punctuation and whitespace from EOL | |
let @a='%s/[.|,|;|:][ \t]*$//g' | |
# Uppercase first letter of each line | |
let @b='%s/^\([a-z]\)/\U\1/g' |
I hereby claim:
To claim this, I am signing this object:
// From André Staltz's talk at ng-europe 2016 | |
// https://www.youtube.com/watch?v=uQ1zhJHclvs | |
function map(transformFn) { | |
const inputObservable = this; // Object created by createObservable | |
const outputObservable = createObservable(function subscribe(outputObserver) { | |
inputObservable.subscribe({ // Give me data from the inputObservable | |
next: function (x) { | |
const y = transformFn(x); | |
outputObserver.next(y); |
git rev-parse --is-inside-work-tree > /dev/null 2>&1 && git ls-files $(git rev-parse --show-toplevel) | grep -q nvmrc | |
nvmrc_exist=$? | |
if [ $nvmrc_exist -eq 0 ] | |
then | |
node_ver=$(node --version | sed 's/^v//') | |
nvm_ver=$(cat $(git rev-parse --show-toplevel)/.nvmrc) | |
if [ $node_ver = $nvm_ver ] | |
then | |
printf "$node_ver" | |
exit 0 |
#!/bin/bash | |
# Usage: ./pingover.sh google.com 5 | |
# Based on default format of BSD ping shipped with macOS | |
ping $1 | awk -F '[= ]' "(\$10 >= $2)" |