Skip to content

Instantly share code, notes, and snippets.

@mortonfox
mortonfox / twitvim_filters.vim
Created November 29, 2011 03:13
TwitVim filters as of 11/28/2011
let twitvim_filter_enable = 1
let regexes = [
\ '/thatcan\.be/',
\ '/youtu\.be/',
\ '/spn\.tw/',
\ '/twittascope\.com/',
\ '@GetGlue',
\ '/miso\.io/',
\ '/raptr\.com/',
@mortonfox
mortonfox / gist:6085485
Created July 26, 2013 02:04
Calca doesn't substitute a in final expression?
a + 5 = 22
a => 17
c = 44
c^2 = a^2 + b^2
b => sqrt(-a^2 + 1936)
@mortonfox
mortonfox / gcHideFinds.user.js
Last active December 20, 2015 07:39
UserScript to remove find counts and disclaimer from geocache page.
// ==UserScript==
// @name Geocaching.com remove find counts and disclaimer
// @namespace geocaching.local
// @description Remove find counts and disclaimer from geocache page.
// @include http://www.geocaching.com/*
// @include https://www.geocaching.com/*
// @version 0.0.2
// ==/UserScript==
var sheet = document.createElement('style')
@mortonfox
mortonfox / rotall.rb
Last active December 25, 2015 12:39
rot-all script
def rotall s
1.upto(25) { |i|
puts "#{i}: #{s.upcase.chars.to_a.map { |c|
case c
when /^[A-Z]$/
((c.ord - 'A'.ord + i) % 26 + 'A'.ord).chr
else
c
end
}.join ''}"
@mortonfox
mortonfox / gitbackup.sh
Created January 28, 2014 20:17
backup one of my github repos
#!/bin/sh
reponame=$1
git clone https://github.com/mortonfox/$reponame.git $reponame
zip -9qr $reponame.zip $reponame
(cd $reponame; git bundle create ../$reponame.bundle --all)
rm -fr $reponame
@mortonfox
mortonfox / .tmux.conf
Last active August 29, 2015 13:56
tmux configuration
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
### Keybase proof
I hereby claim:
* I am mortonfox on github.
* I am mortonfox (https://keybase.io/mortonfox) on keybase.
* I have a public key whose fingerprint is 7D4B 11DF 0FEC E9D3 CB8B C1B8 A61A CB58 C2F3 03D0
To claim this, I am signing this object:
#!/usr/bin/env ruby
require 'socket'
def getMacBytes str
hexb = str.split(/:|-/)
if hexb.length != 6
$stderr.puts "Invalid MAC address: #{str}"
exit 1
end
@mortonfox
mortonfox / index.html
Created October 22, 2015 04:19
tilde.town web page
<html>
<head>
<title>Morton Fox: Welcome to my ~tilde.town~ page</title>
<style type="text/css">
h1 {
background-color:pink;
}
footer {
#!/usr/bin/env ruby
require 'open-uri'
require 'json'
require 'time'
require 'optparse'
require 'ostruct'
WOOT_URL = 'http://api.woot.com/2/events.json?key=95c1faa8df564b7cb65b681c8b07148d&eventType=Daily'.freeze
WOOTOFF_URL = 'http://api.woot.com/2/events.json?key=95c1faa8df564b7cb65b681c8b07148d&eventType=WootOff'.freeze