Skip to content

Instantly share code, notes, and snippets.

View adamlogic's full-sized avatar

Adam McCrea adamlogic

View GitHub Profile
" fuzzyfindertextmate: cmd-e to trigger, cmd-enter to open selected file in new tab
let g:FuzzyFinderOptions = { 'Base':{}, 'Buffer':{}, 'File':{}, 'Dir':{}, 'MruFile':{}, 'MruCmd':{}, 'FavFile':{}, 'Tag':{}, 'TaggedFile':{}}
let g:FuzzyFinderOptions.Base.key_open_tab = '<D-CR>'
map <D-e> :FuzzyFinderTextMate<CR>
# Original Author: Bryan Helmkamp (http://www.brynary.com/2008/9/1/setting-the-git-commit-author-to-pair-programmers-names)
namespace :git do
desc "Configures the git author to a list of developers when pair programming; USAGE: sake git:pair AUTHORS=Adam,Jon OR leave off AUTHORS to revert"
task :pair do
unless File.exists?(".git")
puts "This doesn't look like a git repository."
exit 1
end
(function($) {
$.fn.extend({
jaxy: function() {
return this.each(function() {
if (/^a$/i.test(this.tagName)) $(this).ajaxLink();
if (/^form$/i.test(this.tagName)) $(this).ajaxForm({dataType: 'script'});
});
},
jaxy: function() {
return this.each(function() {
if (/^a$/i.test(this.tagName)) $(this).ajaxLink();
if (/^form$/i.test(this.tagName)) $(this).ajaxForm({dataType: 'script'});
});
},
submitClick: function() {
return this.click(function() {
var el = $(this);
if (el.attr('target')) {
el.findTarget().submit();
} else {
el.parents('form:first').submit();
}
" posting a snippet to Gist http://gist.github.com
:nmap ,g :Gist
(function($) {
$.fn.extend({
jaxy: function() {
return this.each(function() {
if (/^a$/i.test(this.tagName)) $(this).ajaxLink();
if (/^form$/i.test(this.tagName)) $(this).ajaxForm({dataType: 'script'});
});
},
ajaxLink: function() {
return this.click(function() {
$.getScript(this.href);
return false;
});
},
@adamlogic
adamlogic / rails_template.rb
Created December 16, 2008 13:31
an example rails template... just a start
run 'rm public/index.html'
run 'rm public/javascripts/*'
run 'mkdir public/vendor'
run 'haml --rails .'
git :init
git :add => "."
git :commit => "-a -m 'Initial commit'"
class Tracker
include HTTParty
TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
base_uri 'www.pivotaltracker.com'
def self.projects
api_get 'projects'
end