Skip to content

Instantly share code, notes, and snippets.

@paranormal
paranormal / dvorak.txt
Created May 31, 2022 22:40
touch typing: "Solo on keyboard dvorak version 8.x", decompiled drills
1.1
u u u u u u u u u u u u u u u u u u u u
1.2
h h h h h h h h h h h h h h h h
1.3
i i i i i i i i i i i i i i i i i i i i i i i
1.4
# Use Vi, not Emacs, style editing
set editing-mode vi
# Show all completions as soon as I press tab, even if there's more than one
set show-all-if-ambiguous on
# Ignore case
set completion-ignore-case on
# on menu-complete, first display the common prefix, then cycle through the
function zle-keymap-select() {
zle reset-prompt
zle -R
if [ $TERM = "screen" ]; then
if [ $KEYMAP = vicmd ]; then
echo -ne '\033P\033]12;#FF3333\007\033\\'
else
echo -ne '\033P\033]12;#99FF33\007\033\\'
fi
elif [ $TERM != "linux" ]; then
@paranormal
paranormal / .vimpagerrc
Created August 28, 2015 11:30
vimpagerrc
if exists('vimpager')
set nolist
if exists("vimpager_ptree")
set ft=man
endif
endif
aug JS
au!
'use strict';
var pg = require('pg');
var config = require('../package.json');
var client = new pg.Client(config.etc.pg);
function Model(input, output) {
if (!(this instanceof Model)) {
return new Model(input, output);
@paranormal
paranormal / palindromic.c
Created June 16, 2015 23:32
palindromic calculation
//
// A palindromic number reads the same both ways. The largest palindrome
// made from the product of two 2-digit numbers is 9009 = 91 х 99.
//
// Find the largest palindrome made from the product of two 3-digit numbers.
//
#include <stdio.h>
#include <stdlib.h>
#include <math.h> // !!! don't forget to link against math library: -lm !!!
#!/bin/sh
#######################################################################
# Godzilla FlameWolf run script #
# Usage: ./basename [profile_name] #
# Without profile name it runs default profile #
#######################################################################
WOLF_DEN="${HOME}/.mozilla/firefox"
profile=$1
flags=''
@paranormal
paranormal / rspec.snippets
Created July 23, 2013 11:10
UltiSnip rspec snippets
extends ruby
###########################################################################
# Code Examples #
###########################################################################
global !p
def i_p(match):
if match == 'it':
require 'llvm/core'
require 'llvm/execution_engine'
require 'llvm/transforms/scalar'
class Generator
attr_accessor :ptr
def build(code,name, mod)