Skip to content

Instantly share code, notes, and snippets.

View IAMIronmanSam's full-sized avatar
🎯
Focusing

Tony Stark IAMIronmanSam

🎯
Focusing
View GitHub Profile
@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() {
@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 )
{
@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
*/
@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)
@aaronroe
aaronroe / yammerPost.html
Created July 7, 2012 04:49
Doing a post on Yammer via Javascript API
<html>
<head>
<title>A Yammer App</title>
<script src="https://assets.yammer.com/platform/yam.js"></script>
<script>
yam.config({appId: "APP-ID"});
</script>
</head>
<body>
<button onclick='post()'>Post on Yammer!</button>
@shivkumarganesh
shivkumarganesh / cpp.properties
Created September 29, 2012 09:13
Visage Editor (Make Scite as the Default Visage Editor) - Just add this in the file cpp.properties {ie. Options->cpp.properties}
#For Visage Compilation/Build/Run
command.compile.*.visage=visagec -d . $(FileNameExt)
command.build.*.visage=visagec -d . *.visage
command.go.*.visage=visage -cp . $(FileName)
# jad = decompiled class files; pde = Processing.org sketch files
file.patterns.visage=*.visage
lexer.$(file.patterns.visage)=cpp
word.characters.$(file.patterns.visage)=$(word.chars.cxx)$-
@IAMIronmanSam
IAMIronmanSam / Login.visage
Created October 17, 2012 17:03
Login App
package visage.javafx.scene.effect;
import visage.animation.Interpolator;
import visage.animation.Timeline;
import visage.javafx.geometry.Rectangle2D;
import visage.javafx.stage.Stage;
import visage.javafx.scene.Group;
import visage.javafx.scene.Scene;
import visage.javafx.scene.effect.*;
import visage.javafx.scene.control.Button;
using (ClientContext clientContext = new ClientContext("https://yoursite.sharepoint.com/"))
{
var passWord = new SecureString();
foreach (char c in "yourpassword".ToCharArray()) passWord.AppendChar(c);
clientContext.Credentials = new SharePointOnlineCredentials("loginname@yoursite.onmicrosoft.com", passWord);
Web web = clientContext.Web;
@IAMIronmanSam
IAMIronmanSam / UrbanTraveller.sql
Created January 15, 2013 14:47
UrbanTraveller DB
CREATE TABLE UT_USERS (USERID INTEGER Not null primary key generated always as identity (start with 1, increment by 1),USERNAME VARCHAR(15) NOT NULL UNIQUE,PASSWORD VARCHAR(15) NOT NULL, LASTLOGIN TIMESTAMP)
(function($){
$(document).ready(function(){
// Ensure that the SP.UserProfiles.js file is loaded before the custom code runs.
SP.SOD.executeOrDelayUntilScriptLoaded(loadUserData, 'SP.UserProfiles.js');
});
var userProfileProperties;
function loadUserData(){