I hereby claim:
- I am conrjac on github.
- I am conrjac (https://keybase.io/conrjac) on keybase.
- I have a public key ASDcqqS9qBjEwNjtnSZHhXk7foPhh8TexW8ywhY6aYXNMwo
To claim this, I am signing this object:
.project | |
.settings | |
.metadata | |
salesforce.schema | |
Referenced Packages | |
*.sublime-project | |
*.sublime-settings | |
*.sublime-workspace | |
apex-scripts/log | |
build.properties |
$files = Get-ChildItem [INPUT FOLDER PATH - e.g C:\Data\]*.csv | |
Get-Content $files | Set-Content [OUTPUT FILE PATH - e.g C:\Data\MergedCsvFile.csv] |
{ | |
"glossary": { | |
"title": "example glossary", | |
"GlossDiv": { | |
"title": "S", | |
"GlossList": { | |
"GlossEntry": { | |
"ID": "SGML", | |
"SortAs": "SGML", | |
"GlossTerm": "Standard Generalized Markup Language", |
public class JsonParser{ | |
public glossary glossary{get;set;} | |
public class GlossList{ | |
public GlossEntry GlossEntry{get;set;} | |
} | |
public class GlossEntry{ | |
public String Abbrev{get;set;} | |
public String Acronym{get;set;} | |
public String GlossTerm{get;set;} | |
public GlossDef GlossDef{get;set;} |
public DateTime convertISO8601(string str) | |
{ | |
return (DateTime)json.deserialize('"' + str + '"', datetime.class); | |
} |
import-module activedirectory | |
$DaysInactive = 90 | |
$time = (Get-Date).Adddays(-($DaysInactive)) | |
# Get all AD computers with lastLogonTimestamp less than our time | |
Get-ADComputer -Filter {LastLogonTimeStamp -lt $time -and OperatingSystem -notlike "*server*"} -Properties LastLogonTimeStamp,OperatingSystem | | |
# Output hostname and lastLogonTimestamp into CSV | |
select-object Name | export-csv C:\OLD_Computers.csv -notypeinformation |
cat C:\OLD_Computers.csv | Get-ADComputer | Remove-ADObject |
<!-- | |
Simple proof-of-concept to create a .ics calendar event with visualforce. | |
Inspired by Natalie Regier @gnatrae | |
This example uses url parameters to set the details of event. | |
You could create a custom button that invokes this page, like: | |
https://<your-salesforce-domain>/apex/vCalendarPage?start={!TEXT(Obj.StartDate__c)}&end={!TEXT(Obj.EndDate__c)}&subject=Event from Visualforce&description=This .ics event created with visualforce&location=The Cloud | |
An example with literal values you can copy & paste in your browser: | |
https://<your-salesforce-domain>/apex/vCalendarPage?start=20140524T140000&end=20140524T153000&subject=Event from Visualforce&description=This .ics event created with visualforce&location=The Cloud |
I hereby claim:
To claim this, I am signing this object:
public class IdeaCommentTriggerHandler { | |
public static void handleTrigger(List<IdeaComment> workingRecords, List<IdeaComment> oldRecords, System.TriggerOperation triggerEvent ) { | |
final Id orgWideAddress = [select Id from OrgWideEmailAddress WHERE Address ='[email protected]'].Id; // You should consider using a custom setting to manage this - certainly do not hardcode an address Id! | |
switch on triggerEvent { | |
when AFTER_INSERT, AFTER_UPDATE{ | |