Skip to content

Instantly share code, notes, and snippets.

@imiric
imiric / pass.zsh
Last active November 30, 2019 13:43 — forked from vvicaretti/pass.zsh
pass.zsh
# -*- sh -*-
#
# Original plugin: https://gist.github.com/vvicaretti/cb4b2e27dadaf458eb3bc4ac215cf5fd
# Changes:
# - Made lookup case-insensitive
#
# [Pass](https://www.passwordstore.org/)
# the standard unix password manager
# [zaw](https://github.com/zsh-users/zaw)
# zsh anything.el-like widget
Verifying that "imiric.id" is my Blockstack ID. https://onename.com/imiric
@imiric
imiric / gpg2qr.sh
Last active April 1, 2019 19:00 — forked from joostrijneveld/gpg2qrcodes.sh
Producing printable QR codes for persistent storage of GPG private keys
#!/bin/bash
# Main credit goes to joostrijneveld on github:
# Ref: https://gist.github.com/joostrijneveld/59ab61faa21910c8434c
# adopted to "I want to have a pdf with a textual AND QR key to directly
# print it and put it in the bank safe" needs by Jan Stuehler,
# 2015-10-05.
if [ $# -lt 2 ]
then
echo "Please specify [Key ID] and an arbitrary [Name]"
@imiric
imiric / gist:a544208615718a6e2e82ca70e309ffab
Created July 20, 2016 18:41
Tomorrow Night Global Stylish theme
/** Tomorrow Night Global theme https://github.com/chriskempson/vim-tomorrow-theme adapted from Solarized Dark Everywhere.
*
* thttps://userstyles.org/styles/118481/tomorrow-night-global
* by Hafiz Shafruddin @ gmhafiz
* update 2015 Sep 16
*
*/
@namespace url(http://www.w3.org/1999/xhtml);
@imiric
imiric / version.py
Created June 17, 2016 11:13 — forked from thoron/version.py
Added 'with' statment handling to 'closeable' operations and readlines() -> readline()
# -*- coding: utf-8 -*-
# Author: Douglas Creager <[email protected]>
# This file is placed into the public domain.
# Calculates the current version number. If possible, this is the
# output of “git describe”, modified to conform to the versioning
# scheme that setuptools uses. If “git describe” returns an error
# (most likely because we're in an unpacked copy of a release tarball,
# rather than in a git working copy), then we fall back on reading the
# contents of the RELEASE-VERSION file.
#!/bin/bash
# Hosted Zone ID e.g. BJBK35SKMM9OE
ZONEID="enter zone id here"
# The CNAME you want to update e.g. hello.example.com
RECORDSET="enter cname here"
# More advanced options below
# The Time-To-Live of this recordset
" .vimrc
" See: http://vimdoc.sourceforge.net/htmldoc/options.html for details
" For multi-byte character support (CJK support, for example):
set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1
set nocompatible " be iMproved
set nocompatible " be iMproved
set pastetoggle=<F2>
@imiric
imiric / flacsplit.sh
Last active February 27, 2017 14:35
#!/bin/bash
# Split a FLAC file (including HD/96kHz) into individual files using a cue sheet
# Source: http://unix.stackexchange.com/a/63976/44047
cue_file="$1"
aud_file="$2"
time[0]="00:00.00"
c=1
for ts in $(cuebreakpoints "${cue_file}"); do
time[${c}]=${ts}
c=$((c+1))
@imiric
imiric / gist:9152115
Last active August 29, 2015 13:56
Jesus. Horatio. Christ.
$ sudo pacman -Syu
:: Synchronizing package databases...
core 107.0 KiB 154K/s 00:01 [######################################################################] 100%
extra 1531.8 KiB 509K/s 00:03 [######################################################################] 100%
community 2.1 MiB 491K/s 00:04 [######################################################################] 100%
multilib 112.1 KiB 162K/s 00:01 [######################################################################] 100%
pfkernel 10.0 KiB 1111K/s 00:00 [#####################################################################
@imiric
imiric / templatetags.py
Created February 21, 2014 00:40
`{% ifdef %}` and `{% ifndef %}` template tags for Django. Tested with v1.4.9.
from django import template
from django.template.base import VariableDoesNotExist
from django.template.defaulttags import IfNode
from django.template.smartif import IfParser, Literal
register = template.Library()
# Used as a value for ifdef and ifndef tags
undefined = object()