git grep "regex"
git branch -a
Integer classLines = 0; | |
Integer triggerLines = 0; | |
for(ApexClass a : [Select Body From ApexClass]){ | |
List<String> lines = a.Body.split('\n'); | |
classLines += lines.size(); | |
} | |
for(ApexTrigger a : [Select Body From ApexTrigger]){ | |
List<String> lines = a.Body.split('\n'); |
options = { :body => | |
{ :username => 'my', | |
:password => 'password' | |
} | |
} | |
results = HTTParty.post("http://api.topcoder.com/v2/auth", options) | |
## | |
## example for post with papertrail and basic auth | |
## |
<!------------------------------------------------------------------------------------ | |
CreatePDFControllerExtension.cls | |
Example Apex code to create a button in Salesforce that will automate the PDF creation using the 'Account' standard bject | |
(c) Copyright 2014 HEWLETT-PACKARD COMPANY | |
DISCLAIMER: The sample code described herein is provided on an "as is" basis, without warrant of any | |
kind, to the fullest extent permitted by law. Both Hewlett-Packard Company and I do not warrant or |
man COMMAND # Look up help for the given command | |
pwd # Print working directory | |
cd MYDIR # Change directory to MYDIR | |
cd ~/ # Change directory to user root (/Users/USERNAME) | |
cd .. # Change directory up a level | |
mkdir NEWDIR # Create a new directory in the current folder called NEWDIR | |
cp FROM_FILE TO_FOLDER # Copy FROM_FILE into TO_FOLDER | |
cp -r FROM_DIR TO_FOLDER # Copy FROM_DIR into TO_FOLDER |
The git command-line utility has plenty of inconsistencies http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/
A GUI like http://sourcetreeapp.com is often helpful, but staying on the command line usually quicker. This is a list of the commands I use most frequently, listed by functional category:
git status
list which (unstaged) files have changed
<apex:component > | |
<apex:attribute name="topic" description="The topic name" type="String" required="true"/> | |
<apex:includeScript value="{!URLFOR($Resource.streaming, 'streaming/cometd.js')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.streaming, 'streaming/jquery-1.5.1.js')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.streaming, 'streaming/json2.js')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.streaming, 'streaming/jquery.cometd.js')}"/> | |
<script type="text/javascript"> | |
(function($){ | |
$(document).ready(function() { | |
$.cometd.addListener("/meta/*", |
//clear old ones out | |
List<PushTopic> pts = [SELECT ID, Name From PushTopic WHERE Name = 'Merchandise']; | |
delete pts; | |
PushTopic pushTopic = new PushTopic(); | |
pushTopic.Name = 'Merchandise'; | |
pushTopic.Description = 'All records for the Account object'; | |
pushtopic.Query = 'SELECT Id, Name, Quantity__c FROM Merchandise__c WHERE Quantity__c < 50'; | |
pushTopic.ApiVersion = 26.0; | |
pushTopic.NotifyForOperations = 'All'; |
[ | |
{ | |
"code": "AAA", | |
"lat": "-17.3595", | |
"lon": "-145.494", | |
"name": "Anaa Airport", | |
"city": "Anaa", | |
"state": "Tuamotu-Gambier", | |
"country": "French Polynesia", | |
"woeid": "12512819", |
license: gpl-3.0 | |
height: 600 | |
redirect: https://observablehq.com/@d3/d3-force-directed-graph |