Skip to content

Instantly share code, notes, and snippets.

View IAMIronmanSam's full-sized avatar
🎯
Focusing

Tony Stark IAMIronmanSam

🎯
Focusing
View GitHub Profile
@frane
frane / ArrayObjectDemo.coffee
Created December 31, 2011 02:19
Traversing arrays and objects in CoffeeScript
# Traversing arrays and objects in CoffeeScript
# The array and object we use for testing
arr = [1, 2, 3, 4, 5]
obj = {a: 1, b: 2, c: 3, d: 4, e: 5}
# 'in' has a different meaning in CoffeeScript than in JavaScript
# CS: element in array -> JS: array.indexOf(element) >= 0
console.log '5 in arr: ' + (5 in arr)
@lukecanvin
lukecanvin / Adapted-Boostrap.css
Created October 24, 2011 07:57
Example for responsive Bootstrap
/*!
* Bootstrap v1.2.0
*
* Copyright 2011 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Fri Sep 16 11:24:41 PDT 2011
*/
@huobazi
huobazi / gist:1039424
Created June 22, 2011 03:04
Password masking in C# console application
/// <summary>
/// Gets the console secure password.
/// </summary>
/// <returns></returns>
private static SecureString GetConsoleSecurePassword( )
{
SecureString pwd = new SecureString( );
while ( true )
{
@mokkun
mokkun / gist:807825
Created February 2, 2011 15:17
Simple example of how to post a message using the Facebook SDK. I'm assuming that the user is already logged in.
Context context = this.getApplicationContext();
Facebook facebook = new Facebook(YOUR_FACEBOOK_ID);
AsyncFacebookRunner facebookAsync = new AsyncFacebookRunner(facebook);
Handler facebookHandler = new Handler();
SessionStore.restore(facebook, context);
Bundle params = new Bundle();
params.putString("message", "This is my message.");
facebookAsync.request("me/feed", params, "POST", new RequestListener() {