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
  • 08:33 (UTC -12:00)
View GitHub Profile
@lodestone
lodestone / alfred-pinboard-journey.adoc
Created October 1, 2016 19:32
My Alfred Pinboard Workflow Journey
@lodestone
lodestone / init.lua
Created September 29, 2016 15:22
HYPER+O,F Launches Finder
--------------------------------------------------------------------------
o = hs.hotkey.modal.new({}, "F16")
o:bind({}, 'f', function() launch("Finder"); o:exit(); end)
pressedO = function() o:enter() end
releasedO = function() end
k:bind({}, 'o', nil, pressedO, releasedO)
--------------------------------------------------------------------------
@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')
" Script to improve transcribing audio/video in Vim: after loading this file,
" you can control mplayer through Vim commands. No need to switch between your
" Vim instance and the media player during your transcriptions
"
:command -complete=file -nargs=1 Test :call Test( "<args>" )
function StartTranscribing( source )
if filereadable( a:source )
"create a new named pipe for communication between mplayer and vim
let s:mppipe = tempname()
@lodestone
lodestone / _SET_CUSTOM_MAC_ICONS.adoc
Last active April 3, 2016 06:02
Ruby script to set custom icons in Mac OS X El Capitan

Set custom icons in Mac OS X El Capitan

Reset your custom icons for apps in El Capitan with this script. Especially useful for apps that update too frequently. (I’m looking at you: Transmission and Calibre)

Instructions:

  1. Put reset-custom-icons somewhere in your $PATH

  2. chmod +x WHEREVER_YOU_PUT_THE_SCRIPT

@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');

Things I'd Like to See from a Pomodoro App

  • Custom Time Lengths. Not limited to 5,15,25.
  • Sharable Pomodoros. Remote pairing FTW.
  • The ability to "stack" or load up a set of timers.

I would use Marinara Timer for this but I like pomodoro.cc better because it is open-source and delicious.

Mock up:

@lodestone
lodestone / Delete OS X Tags.md
Last active December 14, 2016 02:09
Deleting Mac OS X tags. All of them.

Deleting Mac OS X tags. All of them.

Working on a friend's machine and they had about 200+ tags that were generated by some script or program. They were meaningless and made the tag situation unusable. The following worked to remove most of the tags. It errored out once and when I checked the tags in Finder, they were just the basic ones like Red, Orange, etc.

EDIT: tags doesn't seem to be in brew anymore as of 2016-07-08. Grab it here.

  1. brew install tags
  2. find . | xargs tag -d -N -g -set ''
  3. Let it run.
@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 / 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.