Skip to content

Instantly share code, notes, and snippets.

View dirajkumar's full-sized avatar

Diraj dirajkumar

  • Deloitte
  • Atlanta
View GitHub Profile
@dirajkumar
dirajkumar / cloudSettings
Last active July 17, 2020 23:00
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-07-17T22:59:48.485Z","extensionVersion":"v3.4.3"}
@dirajkumar
dirajkumar / cloudSettings
Last active February 19, 2019 21:40
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-19T21:40:34.570Z","extensionVersion":"v3.2.5"}
@dirajkumar
dirajkumar / gitcheatsheet.textile
Last active August 29, 2015 14:08
Git Cheatsheet

Git – Cheatsheet

Creating/Cloning

git init Initializes a directory as a git repository
git clone Clone a repository into a new directory

Branching

git branch List local branches
@dirajkumar
dirajkumar / 10LinesJumpDown.sublime-macro
Last active August 29, 2015 13:56
Sublime: 10 Lines Jump Down
[
{
"args":
{
"by": "lines",
"forward": true
},
"command": "move"
},
{
@dirajkumar
dirajkumar / 10LinesJumpUp.sublime-macro
Last active August 29, 2015 13:56
Sublime: 10 Lines Jump Up
[
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
},
{
@dirajkumar
dirajkumar / NewLineSemiColon.sublime-macro
Created March 1, 2014 04:40
Sublime: New Line Semi Colon Macro
[
{
"args":
{
"to": "eol"
},
"command": "move_to"
},
{
"args":
@dirajkumar
dirajkumar / Default (OSX).sublime-keymap
Last active August 29, 2015 13:56
Sublime: User Key Bindings
[
{ "keys": ["super+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
{ "keys": ["super+shift+b"], "command": "expand_selection", "args": {"to": "brackets"} },
{ "keys": ["super+shift+d"], "command": "duplicate_line" },
{ "keys": ["super+k", "super+t"], "command": "title_case" },
{ "keys": ["super+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+shift+r"], "command": "refresh_active_file" }, // Mavensmate Plugin Required
{ "keys": ["ctrl+shift+c"], "command": "clean_project" }, // Mavensmate Plugin Required
{ "keys": ["ctrl+shift+t"], "command": "run_apex_unit_tests" }, // Mavensmate Plugin Required
{ "keys": ["super+t"], "command": "open_mac_terminal" }, // MacTerminal Plugin Required
@dirajkumar
dirajkumar / BatchApexAccountUpdate.cls
Last active August 9, 2023 14:04
Apex Snippet: Handling Erroneous Records using Batch Apex
global class BatchApexAccountUpdate implements Database.Batchable<SObject>, Database.Stateful{
global Map<Id, String> errorMap {get; set;}
global Map<Id, SObject> IdToSObjectMap {get; set;}
global BatchApexAccountUpdate(){
errorMap = new Map<Id, String>();
IdToSObjectMap = new Map<Id, SObject>();
}
global Database.QueryLocator start(Database.BatchableContext BC) {
@dirajkumar
dirajkumar / shortcuts.textile
Last active March 29, 2016 16:34
Sublime: Shortcuts

Shortcuts – Sublime and Mavensmate (Mac OS X)

Legends

Command
Option/Alt
Control
Shift
Return/Enter
Delete
@dirajkumar
dirajkumar / Preferences.sublime-settings
Created January 30, 2014 04:38
Sublime: User Preferences
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": false,
"caret_extra_bottom": 2.5,
"caret_extra_top": 2.5,
"caret_extra_width": 1.5,
"caret_style": "phase",
"color_scheme": "Packages/Dayle Rees Color Schemes/sublime/contrast/frontier-contrast.tmTheme", //Dayle Rees Color Schemes Plugin Required
"create_window_at_startup": false,
"detect_indentation": true,