Thank you. @jr0cket
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
## Gist Syntax for Octopress | |
{% gist gist_id [filename] %} | |
## Example Gist in Octopress | |
{% gist 9532424 %} |
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
# Add locally installed nodejs and node package manager to the PATH | |
# Check that the nodejs folder exists before adding | |
if [ -d "$HOME/apps/nodejs" ] ; then | |
NODEJS_HOME=$HOME/apps/nodejs/current | |
PATH="$NODEJS_HOME/bin:$PATH" | |
fi |
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
{ | |
"name": "Node.js Sample", | |
"description": "A barebones Node.js app using Express 4", | |
"repository": "https://github.com/heroku/node-js-sample", | |
"logo": "https://node-js-sample.herokuapp.com/node.svg", | |
"keywords": ["node", "express", "static"] | |
} |
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
// Note: VerifyDate seems to be quite obscure as a class name, so have changed it to UpdateDueDate, as this is what I understand the intent of the class to be. | |
// If updating a due date is not the intent, then I did not understand the intent of the code. | |
public class UpdateDueDate { | |
// Examples: | |
// if current date is 15th Feb and due date is 22nd Feb, return 22nd | |
// if current date is 3rd Feb and due date is 5th March, return the last date in February | |
public static Date SetDueDateWithin30Days(Date currentDate, Date dueDate) { |
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
trigger RestrictContactLastName on Contact (before insert, before update) { | |
// Prevent updating or inserting a Last Name to the value of 'INVALIDNAME' in a Contact record | |
For (Contact contact : Trigger.New) { | |
if(contact.LastName == 'INVALIDNAME') { | |
contact.AddError('The Last Name "'+contact.LastName+'" is not allowed for Contact records'); | |
} | |
} | |
} |
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
;; User behaviors | |
;; ----------------------------- | |
;; Behaviors are stored as a set of diffs that are merged together | |
;; to create the final set of functionality that makes up Light Table. You can | |
;; modify these diffs to either add or subtract functionality. | |
;; | |
;; Behaviors are added to tags, objects with those tags then automatically gain | |
;; whatever logic the behavior imparts. To see a list of user-level behaviors, | |
;; start typing a word related to the functionality you want in between the square | |
;; brackets (e.g. "theme"). |
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
#!/bin/sh | |
## Run Emacs 24 from install of http://emacsformacosx.com | |
/Applications/Emacs.app/Contents/MacOS/Emacs "$@" | |
OlderNewer