This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find "$PWD" -name '*.less' | while read line; do | |
OUTPUT=`echo $line | sed "s|\.less|\.css|"` | |
lessc -x "$line" >> "$OUTPUT" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pseudo-code | |
HASH = BASE64(PUBLIC_KEY + ":" + HMAC_SHA1(PUBLIC_KEY, PRIVATE_KEY) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<api format="JSON"> | |
<authentication type="QueryParameter"> | |
<description><![CDATA[This is a simple query parameter authentication]]></description> | |
<parameters> | |
<parameter name="apiKey" optional="false"> | |
<description><![CDATA[Your API Key]]></description> | |
</parameter> | |
</parameters> | |
</authentication> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __generate_header(self): | |
"Generates a header" | |
header = "rvl\x00" # magic string | |
header += "\x01" # data version | |
header += "\x00" # separator | |
header += "\x00\x04\x06" # application version TODO | |
header += "\x00\x00\x00" # separator | |
return header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
# Call a method asynchronously and get a Thread object | |
thread = bitly.getShortenedUrl("http://www.mashape.com", "bitly-login", "bitly-api-key") { |response| | |
shortenedUrl = response["shortenedUrl"] # See the API's documentation | |
puts "Finally the shortened url is " + shortenedUrl | |
} | |
=begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
// Call a method asynchronously and get a Thread object | |
Thread thread = bitly.getShortenedUrl("http://www.mashape.com", "bitly-login", "bitly-api-key", new MashapeCallback() { | |
@Override | |
public void requestCompleted(Object response) { | |
JSONObject jsonResponse = (JSONObject) response; | |
System.out.println("Finally the shortened url is " + jsonResponse.getString("shortenedUrl")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Sample.h" | |
@implementation Sample | |
- (void) doAPIRequest { | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
@try { | |
// Initialize the Obj-C Client Library with a Developer key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "Bitly.rb" | |
obj = Bitly.new("MY_PUBLIC_KEY", "MY_PRIVATE_KEY") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Bitly import Bitly | |
obj = Bitly("MY_PUBLIC_KEY", "MY_PRIVATE_KEY") | |
def my_function(result): | |
print result | |
obj.getShortenedUrl("http://mashape.com", "mashape", "apikey", my_function) | |
print "waiting" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Bitly import Bitly | |
obj = Bitly("MY_PUBLIC_KEY", "MY_PRIVATE_KEY") |
NewerOlder