Skip to content

Instantly share code, notes, and snippets.

View RajaJaganathan's full-sized avatar
🎯
Focusing

Raja Jaganathan RajaJaganathan

🎯
Focusing
View GitHub Profile
@RajaJaganathan
RajaJaganathan / tasks.json
Created June 30, 2023 13:29 — forked from grabbou/tasks.json
A simple example of launching two long-running processes within Visual Studio Code to make working in monorepo easier
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Expo dev server",
"type": "shell",
"command": "cd ./apps/mobile && yarn start",
"presentation": {
"reveal": "always",
"panel": "new",
@RajaJaganathan
RajaJaganathan / model_vs_helper.js
Created June 13, 2019 16:08
model_vs_helper.js - Favor for Model class than helper function because helper naming going to be redundant, expose internal structure(violate encapsulation
// Model class approach
class UserModel {
constructor(data) {
this.data = data;
}
getSecondaryAddress() {
this.data.address.filter(address => address.secondary);
}
@RajaJaganathan
RajaJaganathan / VScode Favorite Extensions List
Last active August 24, 2017 17:22
VScode Favorite Extensions List
wmaurer.vscode-jumpy // Follow instruction to setup keybindings.json
EditorConfig.EditorConfig
RobinMalfait.prettier-eslint-vscode
TimonVS.ReactSnippetsStandard
TwentyChung.jsx
Zignd.html-css-class-completion
abusaidm.html-snippets
akamud.vscode-javascript-snippet-pack
alexandersage.angular1-code-snippets
christian-kohler.path-intellisense
@RajaJaganathan
RajaJaganathan / VSCode_User_Settings.json
Created August 16, 2017 12:50
Visual Studio Code Favorite Settings
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Menlo, Consolas, Monaco, 'Courier New', monospace",
"editor.fontSize": 14,
"editor.tabSize": 2,
"files.exclude": {
"**/.git": true,
"**/dist": false,
"**/coverage": false,
"**/.DS_Store": true,
@RajaJaganathan
RajaJaganathan / react-immutability-helper.js
Last active July 15, 2017 12:28
immutability helper functions for javascript
// Immutable specfic object in the array
onUpdateItem(index, e) {
const options = [...this.state.options];
const newObject = {
...options[index],
[fieldName]: event.target.value
};
options.splice(index, 1, newObject);
this.setState({ options });
@RajaJaganathan
RajaJaganathan / sublime-keymap-vscode.json
Created November 25, 2016 12:50
sublime-keymap for vscode
// Place your key bindings in this file to overwrite the defaults
[{
"key": "shift+cmd+d",
"command": "editor.action.copyLinesDownAction"
}, {
"key": "cmd+l",
"command": "expandLineSelection"
}, {
"key": "cmd+ctrl+up",
"command": "editor.action.moveLinesUpAction"

Git Commands:

Revert all local file changes: git checkout . git clean -f (untracked files) git clean -d (untracked directories)

Create new branch: git checkout -b develop git push -u origin develop (create remote branch but create local branch)

@RajaJaganathan
RajaJaganathan / csstips.css
Last active December 10, 2015 05:46
Vertically/Horizontal center a content block:
(IE9+)
.center-horizontal {
position: relative;
left: 50%;
transform: translateX(-50%);
}
.center-vertical {
position: relative;
@RajaJaganathan
RajaJaganathan / debugging.css
Created December 9, 2015 13:50
Most-interesting-HTML-JS-DOM-CSS-hacks
src :https://www.quora.com/What-are-the-most-interesting-HTML-JS-DOM-CSS-hacks-that-most-web-developers-dont-know-about
*:nth-child(n) { background-color: rgba(255,0,0,.2); }
or
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
@RajaJaganathan
RajaJaganathan / .gitconfig
Last active December 9, 2015 13:02
my favorites gitconfig options
[user]
name = Raja Jaganathan
email = rajajflex@gmail.com
[alias]
aa = add --all
br = branch
ca = commit --amend
cb = checkout -b
cm = commit -a --amend -C HEAD
ci = commit -a -v