Skip to content

Instantly share code, notes, and snippets.

View jxpx777's full-sized avatar
🤠

Jamie Phelps jxpx777

🤠
View GitHub Profile
//
// NSMetadataItem+JPQLPreviewItem.m
// Created by Jamie Phelps on 2/6/10.
//
// Licensed under the Don't Be A Dick License
//
@interface NSMetadataItem (JPQLPreviewItem)
-(NSString *)previewItemTitle;
-(NSURL *)previewItemURL;
//
// NSMetadataItem+JPIKImageBrowserItem.m
// Created by Jamie Phelps on 10/20/09.
//
// Licensed under the Don't Be A Dick License
//
@interface NSMetadataItem (JPIKImageBrowserItem)
-(NSString *)imageUID;
-(NSString *)imageRepresentationType;
<script type="text/javascript">
// <![CDATA[
eCSStender.disableCache();
eCSStender.addMethod('findBySelector',Sizzle);
function testSupport( selector )
{
try {
eCSStender.methods.findBySelector(selector);
}
catch( e )
jQuery(document).ready(function(){
eCSStender.addMethod('findBySelector',jQuery);
});
# A better mmr alias for opening only the relevant files from a directory that's assumed to be a rails project.
alias mmr="ruby -e 'puts %x{ls -A}.split(\"\n\").reject {|el| el =~ /^\./ || el =~ /(tmp|log|esproj)$/}' | xargs mate"
setup
open '/new_store'
assert_title 'Agile Online Store'
click_and_wait "css=li#product-100 a[href=/new_store/add_to_cart/100?license=SINGLE]"
assert_element_present "css=h3:contains(Summary)"
assert_text "css=td.order-total", "$39.95 USD"
assert_element_present "link=Enter coupon code"
assert_text_present "Buy multiple applications and save!"
assert_text "css=a[href=/new_store/checkout]", "Check Out Now"
click_and_wait "link=Check Out Now"
@jxpx777
jxpx777 / post-checkout
Created December 30, 2010 14:09
Currently broken approach to post-checkout sourcing of .rvmrc
#!/usr/bin/ruby
system("source ./.rvmrc") if ARGV[2] == "1"
@jxpx777
jxpx777 / Crash message
Created January 26, 2011 23:01
User model
(ActionView::Template::Error) "invalid byte sequence in UTF-8"
-------------------------------
Backtrace:
-------------------------------
activesupport (3.0.3) lib/active_support/core_ext/object/blank.rb:68:in `=~'
activesupport (3.0.3) lib/active_support/core_ext/object/blank.rb:68:in `!~'
activesupport (3.0.3) lib/active_support/core_ext/object/blank.rb:68:in `blank?'
app/models/user.rb:57:in `city_and_state'
@jxpx777
jxpx777 / ag_constants.yml
Created January 31, 2011 15:33
Initializer file that loads a YML file for config information for the current environment.
production:
site_url: http://mywebsite.com
ssl_site_url: https://mywebsite.com
licenses_folder: /path/to/shared/licenses
ferret_index_path: /path/to/shared/ferret/index
test:
development:
@jxpx777
jxpx777 / gist:1065623
Created July 5, 2011 19:15 — forked from gruber/gist:1063605
Simple Inbox Archiving Script for Apple Mail
-- See article here: http://daringfireball.net/2007/07/simple_inbox_sweeper
-- The following should be one long line:
set _description to "All unflagged, read messages in each IMAP account
inbox will be moved to the “Archive” mailbox corresponding to that
account. This action is not undoable."
tell application "Mail"
display alert "Archive read messages from IMAP inboxes?" buttons ¬
{"Cancel", "Archive"} cancel button 1 message _description