Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View pcraciunoiu's full-sized avatar

Paul Craciunoiu pcraciunoiu

View GitHub Profile
@pcraciunoiu
pcraciunoiu / pimport
Created March 1, 2011 19:44
Uses pipe viewer to show progress while gunzipping/importing a database.
#!/bin/sh
if [ $# -lt 2 ]; then
echo "USAGE: $0 <filename> <database>"
exit 1
fi
pv -cN source < $1 | gunzip | pv -cN gunzip | mysql $2
@pcraciunoiu
pcraciunoiu / frame.css
Created October 2, 2011 07:52
Stylish Mobile Frame
/* Use the Stylish Firefox addon to get this working. Replace domain with your domain. */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("localhost") {
body:before {
width: 320px;
height: 480px;
top: 0;
position: fixed;
@pcraciunoiu
pcraciunoiu / commit.txt
Created October 20, 2011 06:49
Good git commit message
Short (50 chars or less) summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Further paragraphs come after blank lines.
@pcraciunoiu
pcraciunoiu / config
Created October 20, 2011 07:54
Example remote config
# This should be in .git/config
[remote "david"]
fetch = +refs/heads/*:refs/remotes/david/*
url = git@github.com:daviddul/sowink.git
@pcraciunoiu
pcraciunoiu / gist:2432323
Created April 20, 2012 22:26 — forked from gnunicorn/gist:2352035
memcache extension for Jinja2 on Google AppEngine
from google.appengine.api import memcache
from jinja2 import nodes
from jinja2.ext import Extension, next
"""
A great Jinja2 Extension for quicker caching of fully rendered content using
Memcache on AppEngine.
@pcraciunoiu
pcraciunoiu / ubuntu_bootable.sh
Created August 26, 2013 16:53
Migrate Ubuntu ISO to bootable USB
hdiutil convert -format UDRW -o ~/Downloads/ubuntu-12.04.3-desktop-amd64.img ~/Downloads/ubuntu-12.04.3-desktop-amd64.iso
# Plug in USB
# List disks
diskutil list
# Grab relevant USB
diskutil unmountDisk /dev/disk2
# Copy img to USB

Generating Authy passwords on other authenticators


Update 04.04.2020: Please take a look at many of the forks of this gist or comments, where people have updated or improved upon the code. I have not needed this in a long time, which is why the original document has not been updated and the code probably does not work. Stay secure and only copy and paste code that you trust.

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 (beware, thro