Skip to content

Instantly share code, notes, and snippets.

1 11684 base
2 4409 bytestring
3 3980 containers
4 3379 text
5 3099 mtl
6 2565 transformers
7 2019 directory
8 1791 filepath
9 1717 QuickCheck
10 1702 time
@gfixler
gfixler / github.py
Last active October 13, 2017 01:55
Maya Github Python project bootstrapping script
'''
Maya Python Github project bootstrapping script
Makes particular Maya Python Github project releases available in Maya via the
user script dir. Pass user, project, and release strings to getGithubRelease,
which will download the zip file to the user script dir, and unzip it in there
(if it doesn't yet exist). Returns the full path to the unzipped project
folder, which can be used to modify sys.path[1], circumventing installation.
Note: you still need to ensure all tools deal with one version of the project,
@gfixler
gfixler / gist:ac7fc3808dc82cf519c9ea94c71d8803
Last active May 17, 2017 10:38
An ordered list of all 7293 selfs from the 367 .py files in my Python code repository.
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
self self self self self self self self self self self self self self self self
@gfixler
gfixler / tripod.hs
Last active December 12, 2016 22:23
101 Tripod Hits song lookup
#!/usr/bin/env stack
{- stack --resolver lts-7.13 --install-ghc runghc -}
import Data.Maybe (mapMaybe)
import System.Environment (getArgs)
song :: Int -> Maybe String
song 1 = Just "A Shandy Too Far"
song 2 = Just "Adult Contemporary"
song 3 = Just "Air Guitar"
#!/bin/bash
#Heith Seewald 2012
#Feel free to extend/modify to meet your needs.
#Maya on Ubuntu v.1
#This is the base installer... I’ll add more features in later versions.
#if you have any issues, feel free email me at heiths@gmail.com
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
Intro
Why Vim?
Approach
Configuration
vim as Language
Getting Things Done
Searching Your Text
Moving Around Your Text
Changing Text
Deleting Text
aol bpm
aar bbs
abe bcf
ade bef
adm ben
ahl bim
ame bnf
amr bns
ana bob
ann boo
@gfixler
gfixler / gist:5368404
Last active December 16, 2015 03:18
ThatOtherFile - Stateless buffer toggling in Vim, via basename. Toggle between proj/file.ext and proj/<basename>/<basename>_file.ext
function! ThatOtherFile (basename)
" Toggle between ./file.ext and ./<basename>/<basename>_file.ext
" Prompts to create missing <basename> directory if absent.
let path = expand('%:p:h')
let filename = expand('%:p:t')
let opath = path[-len(a:basename):]
let ofilename = filename[:len(a:basename)]
if opath == a:basename
if ofilename == a:basename.'_'
let opath = path[:-len(a:basename) - 1]
@gfixler
gfixler / sendit
Last active December 12, 2015 10:29
Gnome Nautilus script to zip/scp files to server.
#!/bin/bash
# zip/scp selected file(s) to server; copy URL to X clipboard
# put in ~/.gnome2/nautilus
# Put these 4 lines in ~/.sendit:
# SENDIT_USER='username' # your scp login
# SENDIT_SITE='yoursite.com' # site to scp to
# SENDIT_PATH='website/path' # where to 'sendit'
# SENDIT_LINK='http://www.yoursite.com/path' # for copying URL
@gfixler
gfixler / blamecol.py
Created August 26, 2012 12:25
Simple SVN blame temporal grayscale colorization
#!/usr/bin/env python
'''
SVN blame temporal colorizer
Pipe shell output of `svn blame` through this.
Creates a grayscale heatmap of recentness of line changes.
Normalizes range of revisions over 20 shades of gray.
Usage: