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
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
var countries = { | |
AF: 'Afghanistan', | |
AX: 'Aland Islands', | |
AL: 'Albania', | |
DZ: 'Algeria', | |
AS: 'American Samoa', | |
AD: 'Andorra', | |
AO: 'Angola', | |
AI: 'Anguilla', | |
AQ: 'Antarctica', |
/* | |
* Outputs a float representing the iOS version if user is using an iOS browser i.e. iPhone, iPad | |
* Possible values include: | |
* 3 - v3.0 | |
* 4.0 - v4.0 | |
* 4.14 - v4.1.4 | |
* false - Not iOS | |
*/ | |
var iOS = parseFloat( |
var active = false; | |
function changeRefer(details) { | |
if (!active) return; | |
for (var i = 0; i < details.requestHeaders.length; ++i) { | |
if (details.requestHeaders[i].name === 'Referer') { | |
details.requestHeaders[i].value = 'http://www.google.com/'; | |
break; | |
} |
There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.
Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.
His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the
$mod
refers to the modifier key (window/command or alt by default depending on config)
startx i3
start i3 from command line$mod+<Enter>
open a terminal$mod+d
open dmenu (text based program launcher)$mod+r
resize mode ( or to leave resize mode)$mod+shift+e
exit i3