Skip to content

Instantly share code, notes, and snippets.

Avatar
👩‍💻

Shruti Sridharan shrutis22

👩‍💻
View GitHub Profile
@shrutis22
shrutis22 / startGame.js
Created Jan 15, 2016
Start Game - Brick Game
View startGame.js
function startCollisionChecker() {
intervalId = setInterval(checkCollision, 100);
}
function reset() {
parseInt(jQuery("#points").html("-1"));
}
function startGame() {
$("#start").hide();
@shrutis22
shrutis22 / newCaseNotifierTrigger.java
Created Mar 3, 2016
Trigger which calls HipChat Notify Class
View newCaseNotifierTrigger.java
/**
* 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 Mar 3, 2016
Class which makes API Calls to HipChat Servers
View HipChatNotifier.java
/**
* 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 Mar 4, 2016
To make API calls to CloudBit server to Switch ON/OFF a device
View CloudBit.java
/**
* 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 Mar 7, 2016
Switch ON Button - CloudBit
View Switch_ON.java
{!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 Mar 7, 2016
Switch OFF - CloudBit
View Switch_OFF.java
{!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 Mar 7, 2016
Google URL Shortener API to shorten long URLs
View GoogleUrlShortener.java
/**
* 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 {
View BookmarksController.java
/**
* 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 Jul 15, 2016
Sends search string to Google News Class which in turn makes an API Request to Google News Servers
View NewsWidgetController.cls
/**
* 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 Jul 15, 2016
Calls Google APIS to get Google News
View GoogleNews.cls
/**
* This class exposes methods
* that call Google APIs to
* get news.
*
* @author Shruti Sridharan
* @since 08/03/2016
* @version 1.0
* @revisons N/A
*/