Skip to content

Instantly share code, notes, and snippets.

@imiric
imiric / lookup.go
Created August 10, 2020 14:37
DNS lookup test with sdns
package main
import (
"context"
"fmt"
"log"
"net"
"os"
"time"

Keybase proof

I hereby claim:

  • I am imiric on github.
  • I am imiric (https://keybase.io/imiric) on keybase.
  • I have a public key ASD11K4D060gWrXzD5Pcz3FdTmJL1ebtVfsOmIlEUtOK8go

To claim this, I am signing this object:

@imiric
imiric / xclip
Created August 31, 2017 18:59
xclip for Cygwin/MSYS2
#!/bin/bash
# This replicates xclip functionality used by pass in Cygwin/MSYS2
# Original author: https://tylor.io/2015/07/13/password-manager/
while [[ $# > 0 ]]
do
key="$1"
case $key in
-o|-out)
@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 <dcreager@dcreager.net>
# 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>