Skip to content

Instantly share code, notes, and snippets.

@KorbenC
KorbenC / ApexCsvExample.java
Created April 10, 2017 07:11 — forked from douglascayers/ApexCsvExample.java
Apex CSV Example. Note the use of String.escapeCsv() method
String csv = 'Id,Name\n';
for ( List<Account> accts : [ SELECT id, name FROM Account LIMIT 10 ] ) {
for ( Account acct : accts ) {
csv += acct.id + ',' + acct.name.escapeCsv() + '\n';
}
}
ContentVersion file = new ContentVersion(
title = 'accounts.csv',
versionData = Blob.valueOf( csv ),
@KorbenC
KorbenC / test.sql
Created December 11, 2014 21:18 — forked from anonymous/sql.SQL
declare @column varchar(max)
declare @sql nvarchar(max)
declare @tablename varchar(max)
declare tables cursor for select column_name from INFORMATION_SCHEMA.columns where table_name ='Salesforce_Task_Backup_12102014' and column_name!='ID'
Open tables
Fetch Next FROM tables
into @column
--set @column='userguid'
--set @value='5000010431119001'
@KorbenC
KorbenC / gist:7b75a284b47ccf13f00a
Last active August 29, 2015 14:00 — forked from jrob00/gist:1230741
Change Mac OSx default screenshot directory
$ defaults write com.apple.screencapture location /Users/name/dropbox/photos/screenshots
@KorbenC
KorbenC / Questions you should always ask on a job interview.md
Last active August 29, 2015 13:55 — forked from jondruse/Questions you should always ask on a job interview
Set the groundwork for success. Come prepared with a list of questions about the position and company. This is your chance to really show your interest.

#General Questions:

  1. What is the dress code?
  2. What are the normal business hours?
  3. What are my immediate supervisor's hours?
  4. Do you offer benefits?
  5. What is the waiting period for benefits?
  6. What is your policy on working from home?
  7. How much vacation/sick time would I get?
  8. What is the average employment length?
@KorbenC
KorbenC / bench.py
Created September 28, 2013 13:30 — forked from eoconnell/bench.py
#!/usr/bin/python
from time import time
mark = 0
def tic():
global mark
mark = time()