This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'net/telnet' | |
cache_dump_limit = 100 | |
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3) | |
slab_ids = [] | |
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c| | |
matches = c.scan(/STAT items:(\d+):/) | |
slab_ids += matches | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestResource(urlMapping='/RestTest/*') | |
global with sharing class ApexRESTExample { | |
@HttpGet | |
global static List<NAMESPACE__ManagedPackageObject__c> getTasks() { | |
List<NAMESPACE__ManagedPackageObject__c> test = [SELECT Id, Name from NAMESPACE__ManagedPackageObject__c]; | |
return test; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
private class customTriggerTests{ | |
@isTest | |
static void tagAdditionOnTaskAdd_test(){ | |
//Insert a project | |
TASKRAY__Project__c project = new TASKRAY__Project__c(Name='Test Project', TASKRAY__Status__c = false); | |
insert project; | |
//get the id of the newly inserted project | |
Id projectId = project.Id; | |
//Add a task to the new project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remoteActionDeferredWrap(remoteActionMethod, paramArr, escape){ | |
//Create the deferred object | |
var deferredObj=$j.Deferred(); | |
//Create the callback method, this will manipulate the deferred object to show when complete | |
var callback = function(result,status){ | |
if(status.status==true){ | |
deferredObj.resolve(result); | |
} | |
else{ | |
deferredObj.reject('Error: '+status.message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getLocaleDateString(){ | |
var formats ={"ar-SA":"dd/mm/yy","bg-BG":"dd.m.yyyy","ca-ES":"dd/mm/yyyy","zh-TW":"yyyy/m/d","cs-CZ":"d.m.yyyy", | |
"da-DK":"dd-mm-yyyy","de-DE":"dd.mm.yyyy","el-GR":"d/m/yyyy","en-US":"m/d/yyyy","fi-FI":"d.m.yyyy","fr-FR":"dd/mm/yyyy", | |
"he-IL":"dd/mm/yyyy","hu-HU":"yyyy. mm. dd.","is-IS":"d.m.yyyy","it-IT":"dd/mm/yyyy","ja-JP":"yyyy/mm/dd", | |
"ko-KR":"yyyy-mm-dd","nl-NL":"d-m-yyyy","nb-NO":"dd.mm.yyyy","pl-PL":"yyyy-mm-dd","pt-BR":"d/m/yyyy", | |
"ro-RO":"dd.mm.yyyy","ru-RU":"dd.mm.yyyy","hr-HR":"d.m.yyyy","sk-SK":"d. m. yyyy","sq-AL":"yyyy-mm-dd", | |
"sv-SE":"yyyy-mm-dd","th-TH":"d/m/yyyy","tr-TR":"dd.mm.yyyy","ur-PK":"dd/mm/yyyy","id-ID":"dd/mm/yyyy", | |
"uk-UA":"dd.mm.yyyy","be-BY":"dd.mm.yyyy","sl-SI":"d.m.yyyy","et-EE":"d.mm.yyyy","lv-LV":"yyyy.mm.dd.", | |
"lt-LT":"yyyy.mm.dd","fa-IR":"mm/dd/yyyy","vi-VN":"dd/mm/yyyy","hy-Am":"dd.mm.yyyy","az-Latn-AZ":"dd.mm.yyyy", | |
"eu-ES":"yyyy/mm/dd","mk-mK":"dd.mm.yyyy","af-ZA":"yyyy/mm/dd","ka-GE":"dd.mm.yyyy","fo-FO":"dd-mm-yyyy", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pattern tagSafe = Pattern.compile('[a-zA-Z\\s\\d\\-_]'); | |
Matcher tagSafeMatcher = tagSafe.matcher('Pyramid Construction Inc1234_-.'); | |
String[] strArr = new String[]{}; | |
while(tagSafeMatcher.find()){ | |
system.debug(tagSafeMatcher.group(0)); | |
strArr.add(tagSafeMatcher.group(0)); | |
} | |
system.debug(String.join(strArr,'')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pattern tagSafe = Pattern.compile('[a-zA-Z\\s\\d\\-_]'); | |
Matcher tagSafeMatcher = tagSafe.matcher('Pyramid Construction Inc1234_-.'); | |
String[] strArr = new String[]{}; | |
while(tagSafeMatcher.find()){ | |
system.debug(tagSafeMatcher.group(0)); | |
strArr.add(tagSafeMatcher.group(0)); | |
} | |
system.debug(String.join(strArr,'')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Kick off with | |
Database.executeBatch(new batchUpdate(),50); | |
//Class like this | |
global class batchUpdate implements Database.Batchable<sObject> { | |
// This method returns a SOQL query locator containing the records | |
// to be iterated | |
global Database.QueryLocator start(Database.BatchableContext BC){ | |
return Database.getQueryLocator([SELECT Id,Something__c FROM CustomObj__c]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Setup -> Customize -> Chatter -> Feed tracking | |
//Enable feed tracking on TaskRay History, TaskRay Project Notification, TaskRay Task Notification, and TaskRay View Project objects | |
List<TASKRAY__trHistory__Feed> historyFeed = [SELECT Id FROM TASKRAY__trHistory__Feed]; | |
delete historyFeed; | |
List<TASKRAY__trTaskNotification__Feed> taskNotificationFeed = [SELECT Id FROM TASKRAY__trTaskNotification__Feed]; | |
delete taskNotificationFeed; | |
List<TASKRAY__trProjectNotification__Feed> projectNotificationFeed = [SELECT Id FROM TASKRAY__trProjectNotification__Feed]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'icomoon'; | |
src: url('fonts/icomoon.eot'); | |
} | |
@font-face { | |
font-family: 'icomoon'; | |
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8ywAAAC8AAAAYGNtYXDgfOaMAAABHAAAAERnYXNwAAAAEAAAAWAAAAAIZ2x5ZlRMFxoAAAFoAAA6WGhlYWQASAk3AAA7wAAAADZoaGVhB8ID+wAAO/gAAAAkaG10eOIADMUAADwcAAAA6GxvY2GdD5AIAAA9BAAAAHZtYXhwAEMBLQAAPXwAAAAgbmFtZUQXtNYAAD2cAAABOXBvc3QAAwAAAAA+2AAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAgPA/8D/wAPAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADAAAAAIAAgAAgAAACDgNOYC//8AAAAg4ADmAP///+EgAho3AAEAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQBRABEDrgNuAFMAAAEuASIGBwEOARQWFx4BMjY3AT4BNCYnLgEiBg8BDgEUFhceATI2PwE+ATIWFx4BFAYHAQ4BIiYnLgE0NjcBPgEyFhceARQGDwEeAxc3PgE0JicDrihmamYp/isoKCgoKWZqZigBIBkZGRkZP0I/GbQKCgoKCRcYFwm1BhAQEAYGBgYG/uAWNzk3FhYWFhYB1RY3OTcWFhYWFgQLEQwHAS4pKSkpA24pKSkp/isoZmpmKSgoKCgBIBk/Qj8ZGRkZGbUJFxgXCQoKCgq0BgYGBgYQEBAG/uEWFhYWFjc5NxYB1RYWFhYWNzk3FgQPICIjEi4pZmpmKAA |
OlderNewer