Skip to content

Instantly share code, notes, and snippets.

View shrutis22's full-sized avatar
👩‍💻

Shruti Sridharan shrutis22

👩‍💻
View GitHub Profile
@shrutis22
shrutis22 / startGame.js
Created January 15, 2016 07:21
Start Game - Brick Game
function startCollisionChecker() {
intervalId = setInterval(checkCollision, 100);
}
function reset() {
parseInt(jQuery("#points").html("-1"));
}
function startGame() {
$("#start").hide();
@shrutis22
shrutis22 / newCaseNotifierTrigger.java
Created March 3, 2016 08:32
Trigger which calls HipChat Notify Class
/**
* Trigger to display a message
* in HipChat when a new Case is
* created.
*
* @author Shruti Sridharan
* @since 23/02/2016
* @version 1.0
*/
trigger newCaseNotifierTrigger on Case ( after insert ) {
@shrutis22
shrutis22 / HipChatNotifier.java
Created March 3, 2016 09:19
Class which makes API Calls to HipChat Servers
/**
* This class exposes a method
* to send a message to Hip Chat in a
* specific Room named Hip Chat
* API Exploration.
*
* @author Shruti Sridharan
* @since 23/02/2016
* @version 1.0
*/
@shrutis22
shrutis22 / CloudBit.java
Created March 4, 2016 05:25
To make API calls to CloudBit server to Switch ON/OFF a device
/**
* This class is created to
* make API Calls to CloudBits
* Server
*
* @author Shruti Sridharan
* @since 28/02/2016
* @revisions N/A
*/
global class CloudBit {
@shrutis22
shrutis22 / Switch_ON.java
Created March 7, 2016 05:07
Switch ON Button - CloudBit
{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/36.0/apex.js")}
var obj = {
"percent" : 100,
"duration" : -1,
"recId" : "{!LittleBit__c.Id}"
};
sforce.apex.execute( "CloudBit" , "toggle" , obj );
@shrutis22
shrutis22 / Switch_OFF.java
Created March 7, 2016 05:08
Switch OFF - CloudBit
{!REQUIRESCRIPT("/soap/ajax/36.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/36.0/apex.js")}
var obj = {
"percent" : 0,
"duration" : 3000,
"recId" : "{!LittleBit__c.Id}"
};
sforce.apex.execute( "CloudBit" , "toggle" , obj );
@shrutis22
shrutis22 / GoogleUrlShortener.java
Created March 7, 2016 08:50
Google URL Shortener API to shorten long URLs
/**
* This class exposes methods
* that calls the Google URL
* Shortener API to shorten long URLs.
*
* @author Shruti Sridharan
* @since 22/02/2016
* @version 1.0
*/
global class GoogleUrlShortener {
@shrutis22
shrutis22 / BookmarksController.java
Created March 7, 2016 11:03
Bookmarks Controller
/**
* This class is created to
* save Bookmarks in a
* specific category.
*
* @author Shruti Sridharan
* @since 26/02/2016
* @revision N/A
*/
global class BookmarksController {
@shrutis22
shrutis22 / NewsWidgetController.cls
Created July 15, 2016 06:37
Sends search string to Google News Class which in turn makes an API Request to Google News Servers
/**
* This class is created to call
* Google News Generating class
* and display in the VisualForce
* Page.
*
* @author Shruti Sridharan
* @since 08/03/2016
* @version 1.0
* @revisons N/A
@shrutis22
shrutis22 / GoogleNews.cls
Created July 15, 2016 06:38
Calls Google APIS to get Google News
/**
* This class exposes methods
* that call Google APIs to
* get news.
*
* @author Shruti Sridharan
* @since 08/03/2016
* @version 1.0
* @revisons N/A
*/