Skip to content

Instantly share code, notes, and snippets.

@jonathanwiesel
jonathanwiesel / MercadoPago.m
Created November 11, 2012 05:38
POST request to obtain customized MercadoPago's payment URL
@implementation MercadoPago
-(NSString *) generateMercadoPagoURL:{
NSMutableURLRequest *request = nil;
NSError *errorReturned = nil;
NSURLResponse *theResponse =[[NSURLResponse alloc]init];
//we build the dictionary with the post's parameters
NSMutableDictionary *aDictionary = [[NSMutableDictionary alloc] init];
@jonathanwiesel
jonathanwiesel / osx version
Created August 22, 2012 03:05
Get OSX version via Applescript
tell application "Finder"
set os_version to version as number
end tell
@jonathanwiesel
jonathanwiesel / Growl Setup
Created August 11, 2012 04:50
Applescript Growl setup
--tx to pfbruno
on growlNotify(message)
tell application "System Events"
set isRunning to count of (every process whose bundle identifier is "com.Growl.GrowlHelperApp") > 0
end tell
if isRunning then
tell application id "com.Growl.GrowlHelperApp"
notify with name "General" title "General" description message application name "General"
@jonathanwiesel
jonathanwiesel / explode
Created August 11, 2012 04:46
Applescript input splitter
--explode © 2008 ljr (http://applescript.bratis-lover.net)
on explode(delimiter, input)
local delimiter, input, ASTID
set ASTID to AppleScript's text item delimiters
try
set AppleScript's text item delimiters to delimiter
set input to text items of input
set AppleScript's text item delimiters to ASTID
return input --> list
on error eMsg number eNum