Skip to content

Instantly share code, notes, and snippets.

View pachanka's full-sized avatar

pachanka pachanka

View GitHub Profile
@pachanka
pachanka / kaczynski-code.js
Created June 19, 2018 18:34
Code used by Ted Kaczynski in his journals, originally written in the 1970s
/**
*
* James Benning, List of Meanings; code used by Ted Kaczynski in his journals, originally written in the 1970s
* (In a convenient javascript object)
**/
var list = {
0 : 'for',
1 : 'be', // (all present tense forms, including am, is, are, etc.)
2 : 'be', // (all past tense forms)
@pachanka
pachanka / splaining.1
Created April 22, 2018 23:45
Splaining bash command.
.\" Manpage for splaining.
.\" Contact social@pachanka.org.in to correct errors or typos.
.TH man 8 "22 March 2018" "1.0" "splaining man page"
.SH NAME
splaining \- explain something obvious in a condescending manner.
.SH SYNOPSIS
splaining [suggestion]
.SH DESCRIPTION
splaining is a small command that will return an explanation for any topic you choose or, if no option is given will attempt to explain things anyway, without knowing what is being explained.
.SH OPTIONS
@pachanka
pachanka / ptty-lead-command.js
Created March 7, 2018 10:46
Ptty javascript terminal emulator command example with data prompt.
/**
*
* This example uses ptty to create a terminal emulator and
* a command with prompt that will ask three questions.
*
* More Info at: http://goto.pachanka.org/ptty/docs/#set_command_option
*
* To Adapt this function to your needs:
*
@pachanka
pachanka / search-with-gpg.sh
Last active May 7, 2023 17:57
A simple bash script to grep within a bunch of GPG encrypted files.
#!/bin/bash
#
# Usage search-with-gpg path/to/encrypted/files/*
#
if [ -z "$1" ]; then
echo "Usage: $0 'search string' [path/to/encrypted/files/*]";
exit 1;
else
SEARCH=$1;
@pachanka
pachanka / Seed.js
Created June 22, 2016 01:17
A method object to create crytographically safe seeds and strings.
/* I MADE THIS, I THINK ITS AWESOME */
/* Seed generation and shuffle */
var Seed_int = 0;
var Seed_str = '';
var Seed = {
/* Generate a random number, or perpetuate
a pseudo-random seed if it is provided. */
random_int : function(seed_int){
var rand = 0;

Keybase proof

I hereby claim:

  • I am pachanka on github.
  • I am pachanka (https://keybase.io/pachanka) on keybase.
  • I have a public key whose fingerprint is 2E1A 1B8D 56A0 163B 494F 26C5 A0ED 74C5 34CC A765

To claim this, I am signing this object:

@pachanka
pachanka / txt2qrs.sh
Last active February 14, 2024 00:18
A shell script that uses qrencode to generate printable QR codes to backup sensitive data on paper (like bitcoin or PGP keys).
#!/bin/sh
# I called it ~/bin/txt2qrs.sh but you can call it whatever you like.
usage="USAGE:\n
\t$0 path/to/file.txt [OPTIONS]\n
OPTIONS:\n
\t--help displays this message\n
\t--size default 10\n
\t--dpi default 300\n
@pachanka
pachanka / options.js
Last active October 7, 2015 06:53
A options suite in jQuery that will use localstorage or cookies and set the options in the html page.
/* Cookie or storage functions */
function storage_test(){
var test = 'test';
try {
localStorage.setItem(test, test);
localStorage.removeItem(test);
return true;
} catch(e) {
return false;
@pachanka
pachanka / encrypt-with-gpg.sh
Last active January 31, 2017 06:59
Encrypts a text file and optionally a symetric copy.
#!/bin/bash
#
# encrypt-with-gpg
#
usage="$0 recipient path/to/plaintext/file.txt"
if [ ! $# -eq 0 ] ; then
if [ -z "$1" ] ; then
@pachanka
pachanka / decrypt-with-gpg.sh
Last active January 8, 2017 17:18
A gpg wrapper to decrypt files.
#!/bin/bash
#
# decrypt-with-gpg
#
usage="$0 path/to/encripted/file.txt"
if [ ! $# -eq 0 ] ; then
param=$1