⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
function Promise() { | |
var callbacks = [], | |
promise = { | |
resolve: resolve, | |
reject: reject, | |
then: then, | |
safe: { | |
then: function safeThen(resolve, reject) { | |
promise.then(resolve, reject); | |
} |
import os | |
from log_exceptions import log_exceptions | |
def throw_something(a1, a2): | |
raise Exception('Whoops!') | |
@log_exceptions(log_if = os.getenv('MYAPP_DEBUG') is not None) | |
def my_function(arg1, arg2): | |
throw_something(arg1 + 24, arg2 - 24) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
package main | |
import ( | |
"fmt" | |
) | |
type Node struct { | |
Value int | |
} |
o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
O.......Recursively open the selected directory..................|NERDTree-O|
package main | |
/* | |
#cgo LDFLAGS: -lluajit-5.1 | |
#include <stdlib.h> | |
#include <luajit-2.0/lua.h> | |
#include <luajit-2.0/lualib.h> | |
#include <luajit-2.0/lauxlib.h> | |
int my_func() { |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
It is possible to compile Go programs for a different OS, even though go build
says otherwise.
You'll need:
- a valid toolchain for the platform/os you're targetting
- Go Tip (works on 1.1 and 1.2rc1 but you might as well be on tip)
golang-crosscompile
helper script https://github.com/davecheney/golang-crosscompile- the patch provided
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.