⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Implementations of the getdelim() and getline() functions from POSIX 2008, | |
just in case your libc doesn't have them. | |
getdelim() reads from a stream until a specified delimiter is encountered. | |
getline() reads from a stream until a newline is encountered. | |
See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/getdelim.html | |
NOTE: It is always the caller's responsibility to free the line buffer, even | |
when an error occurs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is file ~/.gitconfig | |
[merge] | |
tool = extMerge | |
[mergetool "extMerge"] | |
cmd = ~/bin/extMerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\" |
When I list my npm packages with npm ls -g
(or without the -g
option for a local node_modules
directory) I see all installed packages and their dependencies. Like so:
$ npm ls -g
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
# Enable silent install | |
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var koa = require('koa'); | |
var route = require('koa-route'); | |
var serve = require('koa-static'); | |
var db = require('./db'); | |
var render = require('./render'); | |
var app = koa(); | |
app.use(serve('public/')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gulp 4 | |
var gulp = require('gulp'); | |
var using = require('gulp-using'); | |
var grep = require('gulp-grep'); | |
var changed = require('gulp-changed'); | |
var del = require('del'); | |
var coffee = require('gulp-coffee'); | |
var less = require('gulp-less'); | |
var coffeelint = require('gulp-coffeelint'); | |
var sourcemaps = require('gulp-sourcemaps'); |
Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.
As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.
- Generate a ssh key
git-run
- A tool for managing multiple git repositoriesgit-open
- Type git open to open the repo website (GitHub, GitLab, Bitbucket) in your browser.git-recent
- List recent git branches, formatted so fancy
eslint
- ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.