Skip to content

Instantly share code, notes, and snippets.

View mhamzas's full-sized avatar

Hamza Siddiqui mhamzas

View GitHub Profile
@JosefJezek
JosefJezek / proxmox-ve.md
Last active January 11, 2021 20:38
Proxmox VE
@mxalix258
mxalix258 / Fiscal year calculations apex
Created August 27, 2013 01:06
Programatically find fiscal year values in apex
//for loop to find Opportunity Stages that are Closed and Won
for(OpportunityStage oppstage : oppstages){
if(oppstage.IsClosed == True && oppstage.IsWon == True){
wonstages.add(oppstage.MasterLabel);
}
}
Integer currentFY;
Integer currentFYMonth;
Integer CurrentFYDays;
Date today;
@afawcett
afawcett / ant-salesforce.xml
Last active December 29, 2022 17:11
Defines some macros around sf:deploy to install and uninstall packages.
<!-- TODO: Review Ant v1.8 local properties -->
<project xmlns:sf="antlib:com.salesforce">
<!-- Download from Salesforce Tools page under Setup -->
<typedef
uri="antlib:com.salesforce"
resource="com/salesforce/antlib.xml"
classpath="${basedir}/lib/ant-salesforce.jar"/>
<!-- Download from http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ -->
@tstachl
tstachl / DeskSample.java
Created April 13, 2013 02:07
Example talking to the Desk.com API from Salesforce (Apex).
public class DeskSample
{
private static String OAUTH_KEY = 'youroauthkey';
private static String OAUTH_SECRET = 'youroauthsecret';
private static String ACCESS_TOKEN = 'youraccesstoken';
private static String ACCESS_TOKEN_SECRET = 'youraccesstokensecret';
public static String DESK_SITENAME = 'yoursite';
public static Void doRequest()
@nicocrm
nicocrm / gist:858086
Created March 7, 2011 04:50
SalesForce Apex CSV Parser
/**
* Used to read a delimited file.
*/
public class SSSCsvReader {
private String delim = ',';
// the input data
private String[] buffer;
public SSSCsvReader(String data){
this.buffer = data.split('\n');