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
  • 15:32 (UTC -12:00)
View GitHub Profile
@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 / 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 / README.md
Created November 11, 2015 10:37 — forked from lmullen/README.md
Word count history

A quick and dirty script to check out each commit of a writing project and find the word count of each Markdown file at that point in time. You might want to use this on a clone of your writing repository. NO WARRANTY EXPRESS OR IMPLIED.

@lodestone
lodestone / atom_opal.md
Created February 15, 2016 09:24 — forked from edubkendo/atom_opal.md
Writing Atom Plugins in Opal (Ruby)

I want to write plugins for Atom's editor in Ruby. Opal makes this possible. Atom is one of several projects in recent times to combine Chromium with Node.js for a desktop app. While it utilizes chromium for it's gui, and boasts "[e]very Atom window is essentially a locally-rendered web page", writing Atom plugins is more like writing a server-side node.js app than a typical single-page client-side app (albeit with really awesome integration with Chrome Devtools). Opal development, on the other hand, has to-date been focused primarily on the browser use-case.

Because of this, I had to make a choice between using the opal-node package from npm, using Opal via Ruby w/ a compile step, or packaging up opal-parser.js, including it with the app, and writing in compilation on the fly. Each choice came with compromises. Using opal-node would have been easiest, just create a top level index.coffee that required opal-node, and then require in your ruby

@lodestone
lodestone / nvgist.js
Created March 17, 2016 04:42 — forked from chmanie/nvgist.js
backup your nvAlt file to github as gists
// backup your nvAlt file to github as gists
// uses openmeta (https://code.google.com/p/openmeta/)
'use strict';
var ChildProcess = require('child_process');
var gaze = require('gaze');
var GitHubApi = require('github');
var fs = require('fs');
var _ = require('lodash');
@lodestone
lodestone / capybara cheat sheet
Created September 1, 2016 17:56 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@lodestone
lodestone / colortrans.py
Created January 11, 2017 14:49 — forked from MicahElliott/colortrans.py
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@lodestone
lodestone / Rakefile.rb
Created April 10, 2017 22:06 — forked from mojavelinux/ Rakefile.rb
Rake build tasks that use Asciidoctor APIs to produce common output formats for a book (or other type of publication) written in AsciiDoc.
=begin
To use this build script, first install the bundler gem:
$ gem install bundler
Then use the `bundle` command to install the dependencies into the project:
$ rm -rf Gemfile.lock .bundle
bundle config --local git.allow_insecure true
bundle config --local build.nokogiri --use-system-libraries
@lodestone
lodestone / README.md
Created May 5, 2017 06:29 — forked from simurai/README.md
Atom for minimalists

For minimalist ❤️ ers

minimalist

Just you, your code and nothing else.... :meditatingbuddha:

@lodestone
lodestone / karabiner.json
Created June 14, 2017 16:52 — forked from ttscoff/karabiner.json
Karabiner Elements hyper key with escape
// This requires 0.91.3 or higher, check for beta updates
// copy below into ~/.config/karabiner/karabiner.json right below "simple_modifications"
"complex_modifications": {
"rules": [
{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift. Escape if no other key used.",
"from": {