Skip to content

Instantly share code, notes, and snippets.

View lstrgiang's full-sized avatar

Giang Lê lstrgiang

  • Remote Software Engineer
  • HCMC, Vietnam
View GitHub Profile
@lstrgiang
lstrgiang / keybindings.md
Created March 9, 2019 01:28 — forked from jimmyhillis/keybindings.md
iTerm 2 Mac-ready key binding additions.

Standard bindings

  • Move left between words: ⌥← | send escape sequence | b
  • Move right between words: ⌥→ | send escapes sequence | f
  • Start of the line: ⌘← | send escape sequence | [H
  • End of the line ⌘→ | send escape sequence | [F
  • Delete previous word ⌥←Delete | send hex code | 0x1B 0x08
  • Delete entire line ⌘←Delete | send hex code | 0x15

Don't forget the amazing icons ⌘ = command and ⌥ = options/alt (why oh why?).

@lstrgiang
lstrgiang / __init__.py
Created November 11, 2018 02:53
Automatically import all all classes or defined attribute within a module
## IMPORTING PROBLEM:
## - When you want to import a class or any object, attribute from a submodule, you need to specify
## the filename within the module path
## Example: you want to import class UserAuthentication declared in the file user_authentication.py
## within the module app.controllers.auth, then:
## > import UserAuthentication from app.controllers.auth.user_authentication
## INSTEAD, WHY NOT: > import UserAuthentication from app.controllers.auth
## Here is the solution:
import pkgutil
@lstrgiang
lstrgiang / surfingkeys.txt
Last active May 7, 2018 02:44
Surfing key configuration
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
map('gt', 'T');
// an example to remove mapkey `Ctrl-i`
unmap('<Ctrl-i>');
map('<Ctrl-]>', 'R');
map('<Ctrl-[>', 'E');
@lstrgiang
lstrgiang / .zshrc
Created January 4, 2018 05:06
Folded (Sectioned) zshrc - Functions were created by Mathias in https://github.com/mathiasbynens/dotfiles
# Export Value {{{
# Export OH MY ZSH {{{
export ZSH=$HOME/.oh-my-zsh
# }}}
# Export ICLOUD{{{
export ICLOUD=$HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs
# }}}
# Export TERM {{{
export TERM=rxvt-256color
# }}}
@lstrgiang
lstrgiang / .vimrc
Last active January 4, 2018 05:00
Folded (Sectioned) Vimrc File
" Basic Configuration {{{
" Ctrl-l to toggle paste mode {{{
set pastetoggle=<C-l>
" }}}
" don't wrap lines {{{
set nowrap
" }}}
" a tab is four spaces {{{
set tabstop=4
" }}}