Skip to content

Instantly share code, notes, and snippets.

View fracarma's full-sized avatar
🏠
Working from home

Francesco Carmagnola fracarma

🏠
Working from home
View GitHub Profile
[
{ "keys": ["ctrl+shift+9"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+alt+shift+9"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+alt+g"], "command": "git_status"},
{ "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"},
{ "keys": ["ctrl+shift++"], "command": "fold"},
{ "keys": ["ctrl+shift+è"], "command": "unfold"}
]
[
{ "keys": ["ctrl+shift+9"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+alt+shift+9"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+alt+g"], "command": "git_status"},
{ "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"},
{ "keys": ["ctrl+shift++"], "command": "fold"},
{ "keys": ["ctrl+shift+è"], "command": "unfold"}
]
@fracarma
fracarma / config.cson
Created May 13, 2016 14:29
Editor package config
"*":
"exception-reporting":
userId: "41266586-5580-d8ee-61c9-360c9c0f3750"
welcome:
showOnStartup: false
core:
disabledPackages: [
"wrap-guide"
"atom-html-preview"
"browser-plus"
@fracarma
fracarma / .gitignore
Last active August 8, 2016 11:04
Gitignore for Dev Salesforce Projects
/*
!.gitignore
!.gitignore.
/src/*
!/src/
!/src/classes/
!/src/triggers/
@fracarma
fracarma / .eslintrc
Created September 12, 2016 12:24 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@fracarma
fracarma / .gitlab-ci.yml
Created December 14, 2016 12:01
YML file for SalesForce CI on GitLab
image: mhart/alpine-node:7.2.0
before_script:
- npm install -g jsforce-metadata-tools
master:
stage: deploy
environment: Production
only:
- master
@fracarma
fracarma / main.js
Created December 20, 2016 15:20
JSON logical expression parser
condition = ["OR", ["AND",{field : 'field1', value : 'value2'},{field : 'field2', value : 'value2'}], {field : 'field2', value : 'value1'}];
item = {obj:{'field1' : 'value1','field2' : 'value2'}};
console.log(validateCondition(condition,item));
function validateCondition(condition, item){
if(!Array.isArray(condition)){
return assertEquals(condition,item);
}
@fracarma
fracarma / crud.js
Created August 8, 2017 07:03
Express-mongoose standard crud operations
module.exports = function(Model) {
var module = {};
module.getAll = function(req, res) {
Model.find({}, function(err, data) {
if (err) {
res.status(500).json(err);
return;
}
res.status(200).json(data);
@fracarma
fracarma / apex.json
Last active April 26, 2018 20:34
Visual Studio Code Snippets
{
"Class Comment (ApexDoc)": {
"prefix": "Class Comment (ApexDoc)",
"body": "/**\n* @author ${1:FraCarma}\n* @date ${2:the date the class was first implemented}\n*\n* @group ${3:a group to display this class under, in the menu hierarchy}\n* @group-content ${4:a relative path to a static html file that provides content about the group}\n*\n* @description ${5:one or more lines that provide an overview of the class}\n*/",
"description": "",
},
"FraCarmaComment": {
"prefix": "FraCarmaComment",
"body": "/* FraCarma: $1 */",
"description": "",