Skip to content

Instantly share code, notes, and snippets.

View nullstyle's full-sized avatar
💭
There is a Downside.

Scott Fleckenstein nullstyle

💭
There is a Downside.
View GitHub Profile
require 'gistit'
gist = Gistit.new
gist.paste("puts 'hello world!'") # => 12345
gist.delete 12345 # => true
public class FastPass {
public static string url(string key, string secret, string email, string name, string uid);
public static string url(string key, string secret, string email, string name, string uid, bool isSecure);
public static string url(string key, string secret, string email, string name, string uid, bool isSecure, Dictionary<string, string> privateFields);
public static string script(string key, string secret, string email, string name, string uid);
public static string script(string key, string secret, string email, string name, string uid, bool isSecure);
public static string script(string key, string secret, string email, string name, string uid, bool isSecure, Dictionary<string, string> privateFields);
}
Dictionary<string, string> parms = new Dictionary<string, string>();
parms.Add("twitter_name", "nullstyle");
var result = FastPass.script("lmwjv4kzwi27", "fiei6iv61jnoukaq1aylwd8vcmnkafrs", "scott@getsatisfaction.com", "Scott", "nullstyle", false, parms);
Output:
<script src="http://getsatisfaction.com/fastpass?email=scott%40getsatisfaction.com&amp;name=Scott&amp;oauth_consumer_key=lmwjv4kzwi27&amp;oauth_nonce=wpiZFNjJxFKq8z9V3L6uYoff5p2m62mXMBJClzm9A&amp;oauth_signature=V99fKTkbGx4jm4GcIWNffClv97U%3D&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1229463267&amp;oauth_token=&amp;oauth_version=1.0&amp;twitter_name=nullstyle&amp;uid=nullstyle" alt="" />
class FastPass
def self.url(consumer_key, consumer_secret, email, nickname, unique_id, secure=false, private_fields={}) ; end
def self.script(consumer_key, consumer_secret, email, nickname, unique_id, secure=false, private_fields={}) ; end
end
<%= FastPass.script(CONSUMER_KEY, CONSUMER_SECRET, current_user.email, current_user.name, current_user.id) %>
class FastPass:
@staticmethod
def url(key, secret, email, name, uid, isSecure=False, **privateFields):
pass
@staticmethod
def script(key, secret, email, name, uid, isSecure=False, **privateFields):
pass
Call:
FastPass.script("lmwjv4kzwi27", "fiei6iv61jnoukaq1aylwd8vcmnkafrs", "scott@getsatisfaction.com", "Scott", "nullstyle", False, twitter_name = "nullstyle")
Output:
<script src="http://getsatisfaction.com/fastpass?email=scott%40getsatisfaction.com&amp;name=Scott&amp;oauth_consumer_key=lmwjv4kzwi27&amp;oauth_nonce=wpiZFNjJxFKq8z9V3L6uYoff5p2m62mXMBJClzm9A&amp;oauth_signature=V99fKTkbGx4jm4GcIWNffClv97U%3D&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1229463267&amp;oauth_token=&amp;oauth_version=1.0&amp;twitter_name=nullstyle&amp;uid=nullstyle" alt="" />
class FastPass {
public static function url($key, $secret, $email, $name, $uid, $is_secure=false, $privateFields=array()) {}
public static function script($key, $secret, $email, $name, $uid, $is_secure=false, $privateFields=array()) {}
}
Call:
FastPass::script("lmwjv4kzwi27", "fiei6iv61jnoukaq1aylwd8vcmnkafrs", "scott@getsatisfaction.com", "Scott", "nullstyle", false, array("twitter_name" => "nullstyle"))
Output:
<script src="http://getsatisfaction.com/fastpass?email=scott%40getsatisfaction.com&amp;name=Scott&amp;oauth_consumer_key=lmwjv4kzwi27&amp;oauth_nonce=wpiZFNjJxFKq8z9V3L6uYoff5p2m62mXMBJClzm9A&amp;oauth_signature=V99fKTkbGx4jm4GcIWNffClv97U%3D&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1229463267&amp;oauth_token=&amp;oauth_version=1.0&amp;twitter_name=nullstyle&amp;uid=nullstyle" alt="" />
public class FastPass {
public static String url(String key, String secret, String email, String name, String uid) throws OAuthException, IOException, URISyntaxException;
public static String url(String key, String secret, String email, String name, String uid, boolean isSecure) throws OAuthException, IOException, URISyntaxException;
public static String url(String key, String secret, String email, String name, String uid, boolean isSecure, HashMap<String, String> privateFields) throws OAuthException, IOException, URISyntaxException;
public static String script(String key, String secret, String email, String name, String uid) throws OAuthException, IOException, URISyntaxException;
public static String script(String key, String secret, String email, String name, String uid, boolean isSecure) throws OAuthException, IOException, URISyntaxException;
public static String script(String key, String secret, String email, String name, String uid, boolean isSecure, HashMap<String, String> privateFields) th