Skip to content

Instantly share code, notes, and snippets.

View mgadda's full-sized avatar

Matt Gadda mgadda

View GitHub Profile
@mgadda
mgadda / Convert to HTML List.tmCommand
Created October 11, 2011 19:28
Convert plain text lists to HTML Lists
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>bundleUUID</key>
<string>79DE1A1A-DCD0-4E2F-B20B-8FEFE97A7270</string>
<key>command</key>
<string>#!/usr/bin/env ruby
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bundleUUID</key>
<string>B7BC3FFD-6E4B-11D9-91AF-000D93589AF6</string>
<key>content</key>
<string>Bacon ipsum dolor sit amet biltong pork loin ball tip swine ground round sausage hamburger beef. Pastrami short ribs ribeye sirloin. T-bone tenderloin rump chuck pork pork chop, ham pork loin jerky tri-tip shank sausage jowl. Chuck jerky meatball pig venison. Meatloaf salami ham flank, hamburger tenderloin jerky beef pork sausage. Tenderloin swine ribeye, bresaola sausage biltong strip steak ham hock pork belly fatback beef shoulder. Flank venison ball tip, pastrami short loin meatball sirloin pork.</string>
<key>name</key>
<string>Bacon ipsum</string>
@mgadda
mgadda / pretty_format_json.rb
Created May 6, 2011 17:04
Pretty formatting for JSON within Rails 3 apps
#!/usr/bin/env ruby
=begin
Copyright (C) 2011 by Matt Gadda
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@mgadda
mgadda / clean_catch.sh
Created March 9, 2011 18:05
Run rake test on a clean working copy of your git-based rails project
#!/bin/bash
# If you're like me and don't always have a squeeky clean working copy, then
# it can be difficult to know for sure if your rails project's "rake test" is
# really returning the same results that your coworkers would see.
# This script clones a copy of whatever local git repository you're currently
# "in" (as reported by pwd), and runs the tests on the clean copy.
# Expect near silence if all goes well.
@mgadda
mgadda / arpack_patch
Created November 21, 2010 03:38
ARPACK Patch in the form of a diff
diff --git a/EXAMPLES/BAND/cnband.f b/EXAMPLES/BAND/cnband.f
index ccecda5..7112fef 100644
--- a/EXAMPLES/BAND/cnband.f
+++ b/EXAMPLES/BAND/cnband.f
@@ -42,7 +42,7 @@ c
c \Usage
c call cnband
c ( RVEC, HOWMNY, SELECT, D , Z, LDZ, SIGMA, WORKEV, N, AB,
-c MB, LDA, FAC, KL, LU, WHICH, BMAT, NEV, TOL, RESID, NCV,
+c MB, LDA, FAC, KL, KU, WHICH, BMAT, NEV, TOL, RESID, NCV,