Skip to content

Instantly share code, notes, and snippets.

View lodestone's full-sized avatar
:octocat:
🤘Grokking Out 🤘

Matthew Petty lodestone

:octocat:
🤘Grokking Out 🤘
  • Kizmeta
  • Kansas City Area, Missouri
  • 12:08 (UTC -12:00)
View GitHub Profile

The Procrastination Monsters

meet your 9 procrastinator demons

…​and beat them to get yourself into motion!

@lodestone
lodestone / styles.yaml
Created October 22, 2015 09:13
.panzer/styles/styles.yaml
########################################################################
# Base - parent of all styles #
########################################################################
Base:
all:
metadata:
numbersections: true
bibliography: "/Users/msprevak/Library/texmf/bibtex/bib/mds-bib/refs.bib"
commandline:
@lodestone
lodestone / git-mv-with-history
Last active September 12, 2015 00:44 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@lodestone
lodestone / pre-commit
Created September 4, 2015 18:27
pre-commit
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
echo "Generating PDF..."
@lodestone
lodestone / zettel_link.tmLanguage
Last active September 4, 2015 17:56 — forked from dansheffler/zettel_link.tmLanguage
A syntax definition for Sublime Text 3 that extends Academic Markdown to include my own wiki-style links
@lodestone
lodestone / styles.less
Created September 4, 2015 09:40
style.less
atom-text-editor::shadow .string.other.link.wiki {
color: rgb(200, 28, 162)
}
@lodestone
lodestone / predict.rb
Last active August 29, 2015 14:23 — forked from inukshuk/predict.rb
#!/usr/bin/env ruby
require 'csl/styles'
require 'citeproc/ruby'
require 'httparty'
require 'thread'
API_KEY = '' # Add your key here!
exit if API_KEY.empty?
require 'pdf-reader'
require './markup_receiver'
doc = PDF::Reader.new(ARGV[0])
$objects = doc.objects
def is_note?(object)
object[:Type] == :Annot && [:Text, :FreeText].include?(object[:Subtype])
end
@lodestone
lodestone / cvimrc
Last active August 29, 2015 14:17
My cVimrc
" Settings
map ; openCommandBar
let mapleader = ","
set noautofocus
map <leader>vc :settings<CR>
map <leader><leader> :buffer<Space>
imap <C-k> deleteToEnd
let blacklists = ["https://mail.google.com/* igi<Esc> j k x s / r f"]
map <leader>gt :open https://twitter.com<cr>
map <leader>gn :open https://news.ycombinator.com<cr>
@lodestone
lodestone / renice-by-name
Last active August 29, 2015 14:17
Renice a process by name on a Mac
#!/usr/bin/env ruby
begin
if ARGV.length == 1
%x[sudo renice -10 `pgrep -f -i #{ARGV[0]}`]
else
%x[sudo renice #{ARGV[0]} `pgrep -f -i #{ARGV[1]}`]
end
rescue
puts "There was an error, try: renice-by-name <(-10..10)> process_name"
end