Skip to content

Instantly share code, notes, and snippets.

View devtanna's full-sized avatar
:octocat:

Dev Tanna devtanna

:octocat:
  • Munich, Germany
  • 07:11 (UTC +02:00)
  • LinkedIn in/devtanna
View GitHub Profile
@devtanna
devtanna / js_notes.js
Created July 31, 2019 11:49
Code: JS notes
1)
// concatenating obj2 properties into obj1...
let obj3 = {...obj1, ...obj2}
// works with arrays too
const arr1 = [1, 2];
const arr2 = [3, 4];
console.log([ ...arr1, ...arr2 ]);
2)
console["log"]("Hello World");
~/Library/KeyBindings
{
"^@\UF701" = "noop:";
"^@\UF702" = "noop:";
"^@\UF703" = "noop:";
"\UF729" = "moveToBeginningOfLine:";
"\UF72B" = "moveToEndOfLine:";
}
@devtanna
devtanna / gist:c0274d7c501bf3c8597e4190ce621daf
Last active September 11, 2018 06:33
Speed up smb network mounts on Mac
vim /etc/nsmb.conf
signing_required=no
step 1: Disable writing .DS_Store files to network shares
On the Mac, open up Terminal and enter the following command:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
@devtanna
devtanna / gist:68c28e7e3762054c7619d6e41ad62ce7
Created September 10, 2018 18:19
Mac OSX commands to speed up
1. Disable animations when opening and closing windows.
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
2. Disable animations when opening a Quick Look window.
defaults write -g QLPanelAnimationDuration -float 0
4. Disable animation when opening the Info window in Finder (cmd⌘ + i).
@devtanna
devtanna / gitconfig
Created August 9, 2018 09:24
Git config
[alias]
st = status
co = checkout
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
nuke = !sh -c 'git branch -D $1 && git push origin :$1' -
nuketag = !sh -c 'git tag -d $1 && git push origin :refs/tags/$1' -
createpatch = !sh -c 'git format-patch origin/master' -
branch-name = "!git rev-parse --abbrev-ref HEAD"
pu = "!git push origin $(git branch-name)"
pl = "!git pull origin $(git branch-name)"