A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
Couldn't find the text of this for a while...
This tutorial guides you through creating your first Vagrant project.
We start with a generic Ubuntu VM, and use the Chef provisioning tool to:
Afterwards, we'll see how easy it is to package our newly provisioned VM
Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it outgit pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out| #!/bin/bash | |
| decode() { | |
| to_decode='s:%([0-9A-Fa-f][0-9A-Fa-f]):\\x\1:g' | |
| printf "%b" `echo $1 | sed 's:&:\n:g' | grep "^$2" | cut -f2 -d'=' | sed -r $to_decode` | |
| } | |
| data=`wget http://www.youtube.com/get_video_info?video_id=$1\&hl=pt_BR -q -O-` | |
| url_encoded_fmt_stream_map=`decode $data 'url_encoded_fmt_stream_map' | cut -f1 -d','` | |
| signature=`decode $url_encoded_fmt_stream_map 'sig'` | |
| url=`decode $url_encoded_fmt_stream_map 'url'` | |
| test $2 && name=$2 || name=`decode $data 'title' | sed 's:+: :g;s:/:-:g'` |
| #!/bin/sh | |
| ############################ | |
| # Author: Till Klampaeckel # | |
| # License: New BSD License # | |
| ############################ | |
| version=$1 | |
| if [ "x$version" = "x" ]; then | |
| echo "Usage: ./$0 5.0|5.1" |
This is a list of examples and articles, in roughly the order you should follow them, to show and explain how promises work and why you should use them. I'll probably add more things to this list over time.
This list primarily focuses on Bluebird, but the basic functionality should also work in ES6 Promises, and some examples are included on how to replicate Bluebird functionality with ES6 promises. You should still use Bluebird where possible, though - they are faster, less error-prone, and have more utilities.
I'm available for tutoring and code review :)
You may reuse all gists for any purpose under the WTFPL / CC0 (whichever you prefer).
| /* | |
| For more detailed instructions on how to use this script, sign up with your email here: | |
| http://adamloving.com/internet-programming/how-toexport-facebook-page-fans | |
| DISCLOSURE: This javascript runs in your browser pretending to be you | |
| looking through your page fans. Facebook should have no problem with this, | |
| but who knows if they will think it is strange to see you looking through | |
| all your fans so quickly (the script waits 3s before requesting each page). | |
| I've had no problem running this so far for 1000s of page fans, but I |
| " Made by @henriquegogo | |
| " Script moved to https://github.com/henriquegogo/dotfiles | |
| " I'll maintain this one just for compatibility with old references and history | |
| au VimEnter * !wget https://raw.githubusercontent.com/henriquegogo/dotfiles/master/.vimrc -O ~/.vimrc |
| <?php | |
| $provider = new stdClass; | |
| $provider->disabled = FALSE; /* Edit this to true to make a default provider disabled initially */ | |
| $provider->name = 'linkedin'; | |
| $provider->title = 'LinkedIn'; | |
| $provider->url = 'https://api.linkedin.com'; | |
| $provider->consumer_advanced = array( | |
| 'signature method' => 'HMAC-SHA1', | |
| 'authentication realm' => '', | |
| 'request token endpoint' => '/uas/oauth/requestToken', |