Skip to content

Instantly share code, notes, and snippets.

View kkrull's full-sized avatar

Kyle Krull kkrull

View GitHub Profile
@kkrull
kkrull / LeadTrigger.trigger
Created December 15, 2021 21:34
Showing how to test a basic insert trigger in Apex
//Deploy with: sfdx force:source:deploy -p force-app/main/default
//Note: 2 or more -p arguments don't appear to work. It only deploys the path in the last argument.
trigger LeadTrigger on Lead (before insert) {
for(Lead leadReference : trigger.new) {
leadReference.Age_Nearest__c = 1;
}
}

Keybase proof

I hereby claim:

  • I am kkrull on github.
  • I am kdkrull (https://keybase.io/kdkrull) on keybase.
  • I have a public key ASCBC306C0vHIMLm4buJgqGN2Pn3aHOvo-fJgmJoU3EwEQo

To claim this, I am signing this object:

@kkrull
kkrull / Scala REPL on Cygwin
Last active August 29, 2015 14:10
Figured out how to run the Scala REPL under Cygwin/tmux in Windows.md
# Getting the Scala REPL to work on Cygwin
There are some [nuances](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&sqi=2&ved=0CCQQFjAB&url=https%3A%2F%2Fwww.java.net%2Fblog%2Fcayhorstmann%2Farchive%2F2010%2F11%2F24%2Freport-sewer-hole-cygwin-jline-rxvt-and-scala-repl&ei=JKh0VLfQBISkyQSi_4CgDg&usg=AFQjCNEnrpRtLU8SZGXW9K11_KTPfBkzWA&sig2=0FHjPkgXNe0h9abfwZNo0w) to getting the Scala REPL working in Cygwin.
If you install version 2.11.4 for Windows, `/Applications32/scala/bin/scala` already attempts to follow these instructions. If you're running under MinGW with `TERM=xterm-256color`, it works. However when you start tmux or screen, it often changes the value of `TERM`. You can get around this by:
TERM=xterm-256color /Applications32/scala/bin/scala
It may be more convenient to drop this in a script, such as `$HOME/bin/scala`