Skip to content

Instantly share code, notes, and snippets.

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

Matt Petty lodestone

:octocat:
🤘Grokking Out 🤘
View GitHub Profile
@lodestone
lodestone / compact.js
Created February 22, 2014 00:25
Somewhat comparable compact function to match ruby's compact method.
Array.prototype.compact = function() { return this.filter(function(e) { return e; }); };
application:open-your-keymap
application:open-your-stylesheet
autocomplete:attach
autoflow:reflow-paragraph
bookmarks:clear-bookmarks
bookmarks:jump-to-next-bookmark
bookmarks:jump-to-previous-bookmark
bookmarks:toggle-bookmark
bookmarks:view-all
check:correct-misspelling
def parse(dices)
%r{^
(?<top_or_bottom>t|b)? # Flag for finding the top or bottom dice
(?<tb_number>\d)? # Number of top or bottom dice
\[(?<dice>.*)\] # The main dice string, to be parsed later
(?<explode>\*)? # Reroll (explode) die rolls? (i.e. 6 on 1d6)
(?<plus>(\+|\-)\d+)? # Additional points to add to roll (or subtract)
\=? # = Target Number or range follows...
(?<target>.*)?$ # The target number (single 4, range 4..6, above 4+, below 4-)
}x =~ dices
NeoBundle 'Shougo/unite.vim'
NeoBundle 'Shougo/unite-outline'
NeoBundle 'Sixeight/unite-grep'
NeoBundle 'basyura/unite-rails'
NeoBundle 'kmnk/vim-unite-giti'
NeoBundle 'thinca/vim-unite-history'
NeoBundle 'tsukkee/unite-help'
NeoBundle 'tsukkee/unite-tag'
NeoBundle 'ujihisa/unite-rake'
NeoBundle 'kopischke/unite-spell-suggest'
@lodestone
lodestone / GistList!.md
Created October 4, 2014 00:12
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text

@lodestone
lodestone / echoHttpRequest.js
Last active August 29, 2015 14:08 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);
@lodestone
lodestone / isTheWebsiteDown.js
Last active August 29, 2015 14:08 — forked from Marak/isTheWebsiteDown.js
Checks to see if a website is down
var http = require('http');
module['exports'] = function isTheWebSiteDown (hook) {
http.get(hook.params.url, function(res){
hook.debug(hook.params.url + " is up and running.")
hook.res.end('false');
}).on('error', function (){
hook.debug(hook.params.url + " is DOWN!")
hook.res.end('true');
});
@lodestone
lodestone / 0-readme.md
Last active August 29, 2015 14:09 — forked from burke/0-readme.md

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@lodestone
lodestone / Rakefile
Last active August 29, 2015 14:10 — forked from rjsamson/Rakefile
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/osx'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'MenubarApp'
app.info_plist['NSUIElement'] = 1
end
%h1 This is the big header in HAML
%ul
%li First
%li Second
%li Third
%li Fourth
%a(href="https://google.com") Google Link