Giter Site home page Giter Site logo

smileart / omg Goto Github PK

View Code? Open in Web Editor NEW
33.0 2.0 2.0 4.14 MB

One More Gear set to follow DRY principle and stop doing things again and again (just a nice name for my dotfiles)

License: MIT License

Shell 79.49% Ruby 2.23% Vim Script 18.29%
shell dotfiles

omg's Introduction

       _____           _ _                  _______ _
      / ____|         (_) |         ____   |__   __( )
     | (___  _ __ ___  _| | ___    / __ \ _ __| |  |/ ___
      \___ \| '_ ` _ \| | |/ _ \  / / _` | '__| |    / __|
      ____) | | | | | | | |  __/ | | (_| | |  | |    \__ \
   __|_____/|_| |_|_|_|_|_|\___|  \ \__,_|_|  |_|   _|___/
  / __ \|  \/  |/ ____| | |_   _|  \____/ | |      | | |
 | |  | | \  / | |  __| |   | |  _ __  ___| |_ __ _| | | ___ _ __
 | |  | | |\/| | | |_ | |   | | | '_ \/ __| __/ _` | | |/ _ \ '__|
 | |__| | |  | | |__| |_|  _| |_| | | \__ \ || (_| | | |  __/ |
  \____/|_|  |_|\_____(_) |_____|_| |_|___/\__\__,_|_|_|\___|_|
    * One More Gear Set v.0.0.2

WARNING!

Before using any of these scripts, make sure you have read the code and agree with every action it's going to do on your system!

This set of scripts is distributed with the hope of being useful, but is provided AS IS with ABSOLUTELY NO WARRANTY!

Moreover, I think you shouldn't and probably not going to use it as it is. The best way to make it useful for yourself is to sneak a snippet of code here and there or to get inspired by some key bindings/aliases/tools/functions/technics being used and make use of them in your own dotfiles configuration. Also I hope some things in this README file also could be used as a reference/memo for those of you who like myself always tend to forget this and that while using just a small bit of all this goodness. Anyway, tanks for coming by ;)

What

Vim and Tmux in OMG

thayer_iterm_2_color_theme.png

incremental_regex_building.gif

easy_motion.gif

YouCompleteMe.gif

smartpairs.vim.gif

Why

Just one more handcrafted gear set to follow DRY principle and stop doing things again and again.

OMG!

(๏ 。๏) <( OMG! )

How

Prerequirements:

** Before usage on a freshly installed MacOS you have to install XCode from the Appstore! ** ** It is also may be needed to install tools and system packages first to proceed! **

Some common ways of packages installation:

./install packages.sh # install ALL the basic packages

./install package_name # install one package
./install package_name --force # install the package even if it's already exists (overwrite .files)
./install package_name package2_name # install a couple of packages
./update # to update oh-my-zsh, vim bundles, brew, ruby gems, npm…

How to override .vimrc

# just run vim like that (or create alias in ~/.user.aliases)
vim -u ~/.your_own_vim_rc # where you could source my .vimrc or do anything you want

Files & folders

  • ~/.omg_aliases/ — folder for git, mc, vim, etc. aliases and functions
  • ~/.vimrc — vim compound config (C-w gf — to open files from it in vim)
  • ~/.vim/.rcs/ — folder for vimrc files
  • ~/.omgzsh — ZSH config for OMG
  • ~/.tmux/ — tmux files and "plugins"
  • ~/.tmux.conf — tmux config file
  • ~/.user.aliases — your own personal aliases and preferences
  • ~/.user.env — a good place for your own environment variables
  • ~/.smileart.zsh-theme — ZSH theme file (default for OMG)

tmux

OMG uses tmux as your usual working environment and as a pairing instrument. All your zsh or vim sessions are supposed to run nested inside tmux session.

OMG's tmux comes with a nice panel and a bunch of useful tools and bindings.

Tmux panel in OMG

Actually the only binding you need to remember is C-a ? which lists all the other bindings. There you can use / to search and N or n to navigate trough search results. After, press q to quit. But here are some useful bindings you should know to use tmux in the most efficient way:

$ \tmux # start new session
$ \tmux new -s session_name # start new session with name
$ \tmux a
$ \tmux at
$ \tmux attach # attach to existent session
$ \tmux a -t myname # attach to named session
$ \tmux ls # list sessions
$ \tmux kill-session -t session_name

Global bindings WITHOUT Ctrl+a prefix

^D — Ctrl+D — detach client sesslion (shows list)

All the bindings below are supposed to be used after Ctrl+a

  • s — list sessions
  • $ — rename session
  • d — detach current session

  • c — new window
  • a — send command to nested tmux
  • n — go to next window
  • p — go to previous window
  • <number> — go to window with
  • , — name window
  • w — list windows
  • f — find window
  • & — kill window
  • . — move window - asks position number (0 — first position)
  • ^a — Ctrl+a — go to first/last window
  • Ctrl + Shift + ←/→ — swap adjacent windows

  • % or b — split pane horizontally
  • " or v — split pane vertically
  • ^o — swap panes
  • q — show pane numbers
  • x — kill current pane
  • _ — space - toggle next panes layout
  • o — go to another pane
  • ! — move the pane to a separate window
  • @ — join a pane from a window #n
  • ^o — Ctrl+o — swap panes
  • z — zoom/zoom out pane (!!!)
  • — move between panes (h j k l)
  • ^↑ ^↓ — Ctrl+Arrows — resize current pane
  • } { — move pane right/left

  • t — clock "screensaver"
  • [ — go to copy mode (like Vim visual v — select mode, y — yank, C-v <space> — visual block etc.)
  • ] — paste text which was copied in copy mode

All commands below are supposed to be used after Ctrl+a :

  • new ⏎ — start new named session from current tmux — asks for name
  • movew ⏎ — move window to the end of windows list
  • movew -t <number> ⏎ — set window's new number (move it to position)
  • rename-window new_name ⏎ — rename window to "new name"
  • detach ⏎ — detach current session
  • copy-mode ⏎ — toggle copy-mode
  • setw synchronize-panes — sync input in all opened panes

Panes resizing

  • resize-pane <###> — resizes the current pane down by 1 line or ### lines
  • resize-pane -U <###> — resizes the current pane upward
  • resize-pane -L <###> — resizes the current pane left
  • resize-pane -R <###> — resizes the current pane right
  • resize-pane -t 2 <###> — resizes the pane with the id of 2 down by ### lines
  • resize-pane -t -L <###> — resizes the pane with the id of 2 left by ### cols

Tips

For vim/tmux windows/sessions/buffers/panes visual reference see vim/tmux windows

git

Git in OMG is packed with a bunch of tools and presets. First of all it's aliases for convenient and fast everyday work and also a couple of nice utilities to make routines and custom tasks even more simple.

Aliases

# Git Aliases
alias gs='git status'
alias gstsh='git stash'
alias gst='git stash'
alias gshw='git show'
alias gshow='git show'
alias gi='vim .gitignore'
alias gcm='git ci -m'
alias gcim='git ci -m'
alias gci='git ci'
alias gco='git co'
alias gcp='git cp'
alias ga='git add -A'
alias guns='git unstage'
alias gunc='git uncommit'
alias gm='git merge'
alias gms='git merge --squash'
alias gam='git amend --reset-author'
alias grv='git remote -v'
alias grr='git remote rm'
alias grad='git remote add'
alias gr='git rebase'
alias gra='git rebase --abort'
alias ggrc='git rebase --continue'
alias gbi='git rebase --interactive'
alias gl='git pull'
alias glg='git l'
alias glog='git l'
alias co='git co'
alias gf='git fetch'
alias gfch='git fetch'
alias gd='git diff'
alias gdsf='git diff --color | diff-so-fancy'
alias gb='git b'
alias gbd='git b -D -w'
alias gdc='git diff --cached -w'
alias gpub='grb publish'
alias gtr='grb track'
alias gpl='git pull'
alias gplr='git pull --rebase'
alias gps='git push'
alias gpsh='git push'
alias gnb='git nb' # new branch aka checkout -b
alias grs='git reset'
alias grsh='git reset --hard'
alias gcln='git clean'
alias gclndf='git clean -df'
alias gclndfx='git clean -dfx'
alias gsm='git submodule'
alias gsmi='git submodule init'
alias gsmu='git submodule update'
alias gt='git t'
alias gbg='git bisect good'
alias gbb='git bisect bad'
alias gbmv='git branch -m'

# Stash (s)
alias gsa='git stash apply'
alias gsx='git stash drop'
alias gsX='git-stash-clear-interactive'
alias gsl='git stash list'
alias gsL='git-stash-dropped'
alias gsd='git stash show --patch --stat'
alias gsp='git stash pop'
alias gsr='git-stash-recover'
alias gss='git stash save --include-untracked'
alias gsS='git stash save --patch --no-keep-index'
alias gsw='git stash save --include-untracked --keep-index'

git-extras

GIT utilities -- repo summary, repl, changelog population, author commit percentages and more.

Gives you such commands as (read about each here):

git extras
git squash
git summary
git effort
git changelog
git commits-since
git count
git create-branch
git delete-branch
git delete-submodule
git delete-tag
git delete-merged-branches
git fresh-branch
git graft
git alias
git ignore
git info
git fork
git release
git contrib
git repl
git undo
git gh-pages
git setup
git touch
git obliterate
git feature
git refactor
git bug
git local-commits
git archive-file
git missing
git lock
git locked
git unlock
git reset-file
git pr
git root

git-up

git pull has two problems:

  • It merges upstream changes by default, when it's really more polite to rebase over them, unless your collaborators enjoy a commit graph that looks like bedhead.

  • It only updates the branch you're currently on, which means git push will shout at you for being behind on branches you don't particularly care about right now.

Solve them once and for all.

$ git up

git-open

Type git open to open the repo website (GitHub, GitLab, Bitbucket) in your browser.

$ git open [remote-name] [branch-name]
$ git open issue
$ git open
# opens https://github.com/REMOTE_ORIGIN_USER/CURRENT_REPO/tree/CURRENT_BRANCH

$ git open upstream
# opens https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/CURRENT_BRANCH

$ git open upstream master
# opens https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/master

$ git open issue
# If branches use naming convention of issues/#123,
# opens https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/issues/123

GitUp

Work quickly, safely, and without headaches. The Git interface you've been missing all your life has finally arrived.

gitsu

Little tool which helps to manage your projects' Git users by making it easy to switch between users.

Gitsu lets you:

  • quickly switch between Git users
  • switch to multiple users at once for paring
$ git su --add "John Galt <[email protected]>"
User 'John Galt <[email protected]>' added to users
$ git su --add "Raphe Rackstraw <[email protected]>"
User 'Raphe Rackstraw <[email protected]>' added to users

$ git su jg
Switched to user John Galt <[email protected]>
$ git su raphe
Switched to user Raphe Rackstraw <[email protected]>
$ git su jg rr
Switched to user 'John Galt and Raphe Rackstraw <[email protected]>'

Legit

Legit is a complementary command-line interface for Git, optimized for workflow simplicity. It is heavily inspired by GitHub for Mac.

$ git sync
# Syncronizes current branch. Auto-merge/rebase, un/stash.

$ git switch <branch>
# Switches to branch. Stashes and restores unstaged changes.

$ git publish <branch>
# Publishes branch to remote server.

$ git unpublish <branch>
# Removes branch from remote server.

$ git branches
# Nice & pretty list of branches + publication status.

git-semantic-commits

Simple git commands aimed to help git users to write better git commit messages. Inspired by Sparkbox's awesome article on: semantic commit messages.

git feat "commit-message-here"     # -> git commit -m 'feat: commit-message-here'
git docs "commit-message-here"     # -> git commit -m 'docs: commit-message-here'
git ch "commit-message-here"       # -> git commit -m 'chore: commit-message-here'
git fix "commit-message-here"      # -> git commit -m 'fix: commit-message-here'
git rf "commit-message-here"       # -> git commit -m 'refactor: commit-message-here'
git style "commit-message-here"    # -> git commit -m 'style: commit-message-here'
git test "commit-message-here"     # -> git commit -m 'test: commit-message-here'
git localize "commit-message-here" # -> git commit -m 'localize: commit-message-here'

# If you would still like to use your text editor
# for your commit messages you can omit the message,
# and do your commit message in your editor.
git feat # -> git commit -m 'feat: ' -e

More

In addition there are also some useful commands to use with git:

  • git fix — add currnet fixes to the commit (git add -A; git-commit -v --amend alias)
  • git git stash-unapply — undo stash applay (!git stash show -p | git apply -R alias. Works only for stash apply finished without conflicts.)
  • git dsf or gdsf — fancy git diff using diff-so-fancy
  • git permissions-reset — reset git's file permissions changes

Docs

Also OMG's ZSH antigen plugins provide convenient and pretty smart autocompletion for git commands, branches, remote branches and so on. And allow you to use such branch conventions as git-flow.

Vim

One of the core features of OMG is a preconfigured vim editor with 40+ plugins and custom settings. You could use it as it is or setup your own configuration to match your needs.

###Plugins

Here is the current plugins list with short explanation for each one:

  • neobundle.vim — NeoBundle is a next generation Vim plugin manager.
  • vim-colorschemes — one colorscheme pack to rule them all (Frankly speaking, personaly I prefer neverland-darker scheme)
  • vim-airline — lean & mean status/tabline for vim that's light as air
  • ctrlp.vimFuzzy file, buffer, mru, tag, etc finder.
  • nerdtree — A tree explorer plugin for vim.
  • vim-easymotion — Vim motions on speed!
  • tagbar — Vim plugin that displays tags in a window, ordered by scope
  • csv.vim — A Filetype plugin for csv files
  • syntasticSyntax checking hacks for vim
  • vim-indent-guides — A Vim plugin for visually displaying indent levels in code
  • vimproc — Interactive command execution in Vim.
  • ZoomWinZoom in/out of windows (toggle between one window and multi-window)
  • vim-choosewin — land to window you choose like tmux's 'display-pane'
  • tabular — Vim script for text filtering and alignment
  • nerdcommenter — Vim plugin for intensely orgasmic commenting
  • vim-misc — Miscellaneous auto-load Vim scripts
  • vim-session — Extended session management for Vim (:mksession on steroids)
  • vim-move — Plugin to move lines and selections up and down
  • trailertrash.vim — Identify and Irradicate unwanted whitespace at the end of the line
  • YankRing.vim — Maintains a history of previous yanks, changes and delete
  • ctrlp-extensions.vimPlugins for ctrlp.vim (cmdline history, yank history, extension selector menu)
  • ctrlp-markShow all marks in CtrlP menu
  • undotree — Display your undo history in a graph.
  • vim-surround — surround.vim: quoting/parenthesizing made simple
  • delimitMate — Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
  • vim-fugitive — fugitive.vim: a Git wrapper so awesome, it should be illegal
  • vim-togglelist — Functions to toggle the Location List and the Quickfix List windows.
  • vim-eunuch — eunuch.vim: helpers for UNIX
  • vim-markology — Vim mark visualization, navigation and management
  • vim-wipeoutDestroy all buffers that are not open in any tabs or windows.
  • tabman.vimTab management for Vim
  • vim-signify — Show a VCS diff using Vim's sign column.
  • nerdtree-chmod — A plugin for NERD Tree that allows for chmod'ing files
  • matchit.zipextended % matching for HTML, LaTeX, and many other languages
  • OpenUrl.vimOpen URL in vim
  • sensible.vim — Defaults everyone can agree on
  • opinion.vim — an almost-universal set of defaults that most people can agree on
  • sleuth.vim — plugin which automatically adjusts 'shiftwidth' and 'expandtab' heuristically
  • smartpairs.vim — Fantastic selection for VIM
  • incsearch.vim — Improved incremental searching for Vim
  • neosnippet — modern snippets plugin + vim-snippets & neosnippet-snippets sets
  • context_filetype.vim — context filetype library for Vim script
  • vim-json — a better JSON for Vim
  • ferret — Enhanced multi-file search for Vim

Front-end Bundle (works on js/css/html files only)


Ruby Bundle (works on rb files only)

Vim essentials (@TODO Section in progress…)

Bindings

  • f <char> F <char> — go to symbol in row forward/backward
  • s <char><char> S <char><char> — 2-character search, similar to vim-seek/vim-sneak
  • <leader><leader> w — vim-easymotion plugin binding to go forward
  • <leader><leader> p — paste clipboard in PASTE mode
  • C-/ — toggle comment for block or line
  • C-\ — toggle NERDTree (auto synchronised between tabs)
  • CTRL-] — go to definition, CTRL-t — go back
  • <leader>mt — open/close tabs manager
  • Tab / S-Tab — navigate through tabs
  • <leader>g — GOTO anything with CtrlP (files, buffers, mru, commands, etc.), look for internal bindings HERE
  • <leader>t — toggle tags menu
  • q — exit from any dialog pane or list
  • <leader>h — toggle UndoTree pane (history)
  • <leader>b — open the bundle page (on the GitHub)
  • <leader>u — open the URL under the cursor
  • gf — "go to file", opens path under cursor in the same window
  • C-w gf — open path under cursor in new tab
  • C-k C-j — move current line or selection UP and DOWN
  • - — quickly choose a window!
  • C-ww — go to next window
  • C-l — hide the last search highlights
  • C-d<leader> — expand an Emmet pattern
  • <snippet>C-k — expand snippet
  • <snippet_list>Tab — expand snippet from snippets list
  • /<search_term> cgn <normal mode> gn . — multicursor-like text replacement

Commands

  • :Wipe — destroy all buffers that are not open in any tabs or windows
  • :ListLeaders — full <leader> bindings list (!!!)
  • :UpdateTags -R </path/to/project> — recursively update ctags for project
  • :'<,'>Tabularize /= — align selected lines by "="
  • :'<,'>Tabularize /:\zs — align selected lines by ":" without moving ":"
  • :SaveSession <session_name> — save session with name "session_name"
  • :OpenSession <session_name> — open session with name "session_name"
  • :set hls && :nohls — enable/disable search highlight
  • :set paste && :set nopaste — enable/disable paste mode (to keep indents on paste)
  • :YRGetElem — view list of prev yanks and paste any
  • :nohls — disable search results higlight
  • :SudoWrite — write current file as superuser (substitute user)
  • :Ack keyword — search for 'keyword' in all files
  • :Acks /keyword/replacement/ — replace 'keyword' in all files
  • :NeoBundleUpdate — it's a good practice to run it occasionally
  • :AirlineRefresh — redraw Airline bars
  • set et|retab — replace tabs with spaces
"Split" commands and bindings
  • :sp — will split the Vim window horizontally. Can be written out entirely as :split
  • :vsp — will split the Vim window vertically. Can be written out as :vsplit
  • Ctrl-w — Ctrl-w moves between Vim viewports
  • Ctrl-w j — moves one viewport down
  • Ctrl-w k — moves one viewport up
  • Ctrl-w h — moves one viewport to the left
  • Ctrl-w l — moves one viewport to the right
  • Ctrl-w = — tells Vim to resize viewports to be of equal size
  • Ctrl-w - — reduce active viewport by one line
  • Ctrl-w + — increase active viewport by one line
  • Ctrl-w q — will close the active window
  • Ctrl-w r — will rotate windows to the right
  • Ctrl-w R — will rotate windows to the left
  • Ctrl-w o — show this window only
"Spell Check" commands and bindings
  • :setlocal spell spelllang=ru,en — turn spell check ON (will suggest to download dics)
  • :set spelllang=ru_ru — set spell check lang or install dict for a language
  • :set spell! — turn spell check on/off while working
  • ]s — next misspelled word
  • [s — prev misspelled word
  • zg — mark as good word
  • zw — mark as wrong word
  • zug and zuw — undo word add
  • zG — ignore word (internal wordlist)
  • z= — suggest corrections
  • :help spell — further reading
"Macro" commands and bindings
  • q<letter> — start recording macros to register <letter>
  • q — stop macros recording
  • (<number>)@<letter> — execute macros in register <letter> (<number> times)
  • (<number>)@@ — execute last macros once again
  • "<letter>p — paste register <letter> into the current cursor position
  • :let @<letter>='<actions>' — set macros with <actions> for <letter> with command

Color themes

Docs

Tips

ZSH

Plugins

ZSH by itself
antigen.zsh, zsh-users/zsh-syntax-highlighting, zsh-users/zsh-history-substring-search, gnu-utils, gem, node, npm, osx, python, vagrant, brew
With git package
git, git-extras, git-flow, git-hubflow, git-remote-branch, gitfast
With Ruby
bundler, ruby, rbenv, rake, gem

Commands

  • ext_ip — returns external IP address of your machine
  • lan_ip — returns LAN IP address of your access point
  • rpi_ip — returns LAN IP address of Raspberry Pi (if found)
  • list_ports — returns ports list with statuses and services
  • ccat <file> — cats file with syntax highlights
  • z <pattern> — allows you to go to any previously visited dir by pattern
  • r — convenient alias for reset command to clear screen
  • <pattern> ↓ ↑ — search for pattern in history (even in substring meaning)
  • ack <patten> — for super-quick file or stream search (instead of grep)
  • offline / online — (MacOS only!) enable/disable networking (nice feature for testing something)
  • spoof_mac — (MacOS only!) a nice function for the airports WiFis (you know what I mean ;) + pay attention to rig tool ;)
  • spoof — a bit more advanced tool (as opposed to my simple function above) + Linux support!
  • b.system.random32 — (WAT?! --> pice of my OMG's bash module) to generate random 32 symbol string (like password or anything)
  • b.system.random32_alphanum — same as b.system.random32 but only with alphanumeric symbols only
  • add_pair_user <pair_username> / delete_pair_user <pair_username> — add or delete new SSH user for wemux (READ "Pairing" section)
  • sys_info — lists useful info about system/hardware/soft/CPU/memory/core/etc.
  • disk_list — prints disks list (both in Debian and MacOS)
  • whiteboard <input_image>.jpg <output_image>.png — clean up whiteboard photos (original gist)
  • pushover <msg> — send message with pushover API (for more details see pushover tool in Tools section)
  • k — list directory (legend and help)
  • tldr <command> — simplified man page with examples
  • black_n_white — useful script to get rid of ANSI Escape sequences could be used like: cat colourful.patch | black_n_white > bw.patch
  • hl <language> — take a source code from the clipboard, higlight it and put back (MacOS only, great to use with OmniOutliner)
  • mov2gif <file> — convert .mov file (screencast filmed with QuickTime or Screeny to an animated GIF
  • m — Swiss Army Knife for macOS! (MacOS only!) + man
  • istats — list MacOS stats (MacOS only!) + man
  • fuck — correct your previous console command
  • pru — process any command output with pure Ruby
  • transfer — share file publicly using transfer.sh
  • curl <url_returning_json> | jid — incrementally dig any JSON
  • borg "<request>" — search for a bash snippet
  • mac help — to see all the mac commands
  • cd ⏎ / cd .. / cd - — to cd somewhere with an interactive filter
  • echo 'error ok' | h error okhighlight any output with colours (depends on ack)
  • gen <something> — generate README.md, LICENSE, contributing.md in one command!
  • rtop <user>@<ip> — connect to the remote server to monitor it with rtop
  • echo <text> | clipboard / clipboard — put/get some text to/from the clipboard
  • ktimez convert 16:20 UTC to CEST PST EDT — convert time zones see docs
  • wttr <place> <lang> — check the weather from the terminal. see docs
  • googler <search-term> or googler -N <news-search-term> — Let me google that for you :) see docs

Key bindings

FZY Bindings

  • CTRL-T - Paste the selected files and directories onto the command line
  • CTRL-R - Paste the selected command from history onto the command line

MacOS / Debian tools

  • curl — a command line tool for transferring data with URL syntax
  • tree — lists dir structure as ASCII tree
  • feh — simple cli-oriented image viewer (not in CLI itself)
  • ack — is a tool like grep, optimized for programmers
  • pv — aka pipe-viewer — streaming/pipe progress bar for CLI tasks
  • unar — universal one-command unarchiver to unpack them all!
  • archey — A script for MacOS to display system info (MacOS only)
  • watch — runs command repeatedly, displaying its output
  • wget — package for retrieving files using HTTP, HTTPS and FTP
  • figlet — FIGlet is a program for making large letters out of ordinary text
  • toilet — The TOIlet project attempts to create a free replacement for the FIGlet utility
  • aview — aview is an high quality ascii-art image(pnm) browser and animation(fli/flc) player
  • rig — RIG stands for Random Identity Generator.
  • pygmentize — a generic syntax highlighter for general use in all kinds of software
  • k — better directory listings for ZSH
  • youtube-dl — small command-line program to download videos from YouTube.com and other video sites
  • pushover — small tool to send push notification with pushover.net (if you installed pushover.sh with tools OMG-package)
  • tldr — simplified and community-driven man pages
  • pinboard -a <term> — search for Pinboard entry
  • multitail — for monitoring multiple log files
  • m-cli — Swiss Army Knife for macOS! (MacOS only)
  • jq — a lightweight and flexible command-line JSON processor
  • jid — JSON Incremental Digger
  • jd — Interactive JSON Editor
  • iStats — a tool for your mac stats (MacOS only)
  • puma-dev — a fast, zero-config development server for MacOS and Linux
  • fzy — a better fuzzy finder
  • thefuck — magnificent app which corrects your previous console command
  • pru — Pipeable Ruby - forget about grep / sed / awk / wc ... use pure, readable Ruby!
  • kap — an open-source screen recorder built with web technology (MacOS only)
  • localepurge — to delete unnecessary locales (Debian only)
  • iterm2term <file>.itermcolors — convert itermcolors to Terminator Color Theme (with Python) then look at ~/.config/terminator/config (Debian only)
  • borg — Search and save shell snippets without leaving your terminal
  • mac — macOS command line tools for developers (MacOS only)
  • enhancd — A next-generation cd command with an interactive filter
  • generate — command line tool and developer framework for scaffolding out GitHub projects
  • cloc — cloc counts blank lines, comment lines, and physical lines of source code in many programming languages
  • mitmproxy — an interactive console program that allows traffic flows to be intercepted, inspected, modified and replayed
  • rtop — Remote Server Monitoring over SSH
  • icdiff — improved colored diff
  • clipboard-cli — Access the system clipboard (copy/paste) - cross-platform
  • hecate — a terminal hex editor unlike any you've ever seen
  • spoof — Easily spoof your MAC address in OS X & Linux!
  • keybase — Crypto for everyone! (see CLI docs)
  • googler — Google Search, Google Site Search, Google News from the terminal.
  • task — Free and Open Source Software that manages your TODO list from the command line
  • fkill — Fabulously kill processes. Cross-platform
  • ncdu — a disk usage analyser with an ncurses interface
  • wuzz — Interactive cli tool for HTTP inspection
  • timg — Terminal Image Viewer
  • hotel — simple process manager for developers (\w proxy auto-config)
  • hub — command-line wrapper for git that makes you better at GitHub (MacOS only)
  • serve — Static file serving and directory listing
  • httplab — an interactive web server
  • cheat — interactive cheatsheets on the command-line (at the moment in OMG it's MacOS only)

MoreUtils

  • chronic — runs a command quietly unless it fails
  • combine — combine the lines in two files using boolean operations
  • errno — look up errno names and descriptions
  • ifdata — get network interface info without parsing ifconfig output
  • ifne — run a program if the standard input is not empty
  • isutf8 — check if a file or standard input is utf-8
  • lckdo — execute a program with a lock held
  • mispipe — pipe two commands, returning the exit status of the first
  • parallel — run multiple jobs at once
  • pee — tee standard input to pipes
  • sponge — soak up standard input and write to a file
  • ts — timestamp standard input
  • vidir — edit a directory in your text editor
  • vipe — insert a text editor into a pipe
  • zrun — automatically uncompress arguments to command

Color Themes

Dev

Apps

  • pgAdmin 4 — the most popular and feature rich Open Source administration and development platform for PostgreSQL
  • Robomongo — native and cross-platform MongoDB manager
  • Redis-Commander — a node.js web application used to view, edit, and manage a Redis Database
  • usql — a universal command-line interface for SQL databases

DB's

  • Redis — an open source, in-memory data structure store, used as a database, cache and message broker.
  • PostgreSQL — The world's most advanced open source database ©
  • MongoDB — a document database with the scalability and flexibility that you want with the querying and indexing that you need

Pairing

OMG allows you easily setup pairing sessions to work remotely on the same task. Here is basic workflow to setup and start pairing on your OMG environment

If you are firewall/router admin

> add_pair_user test # create new user for remote session with 'name' login
Added user: test
User password: KVBK8CFO@pi$&I3JMrCnP&^exm3F+(80 # save this!!!

> wemux    # to login yourself to the wemux session and/or start server
> ext_ip   # to print your external IP …… OR ……
> local_ip # to print your local IP

> ssh test@<lan-ip> # to login your pair user on LAN
> ssh test@<ext-ip> # to login your pair user from outside the LAN

> wemux users # to list currently connected users inside wemux session
> delete_pair_user test # delete user with name 'test'

Edit user's .bash_profile file to change default client mode (default configured mode is: mirror). Other modes could be: pair — to allow user to work with you; rogue — to allow user to create his own windows.

WARNING: DO NOT delete ; exit command after default mode in user's .bash_profile which disconnects him on detachment.

If you are NOT firewall/router admin

Another way to pair with remote user in OMG is to use tmate command. Before it you have to quit your current tmux session with C-d. After that run tmate command and execute tmate show-messages to copy/paste SSH line for read-only or full pair modes. Send that command to your mate and… enjoy. To finish session use C-d again.

Assorted tips

Unix diff and patches

# Files
> diff -u <old_file> <new_file> > patch.diff        # create patch
> patch < patch.diff                                # apply patch
> patch -R < patch.diff                             # revert patch

# Git
> git format-patch feature --stdout > feature.patch # create a patch file
> git format-patch -<n>                             # generate separate patch files for the last <n> commits
> git apply --stat feature.patch                    # git patch info
> git apply --check feature.patch                   # check patch integrity
> git am --signoff < feature.patch                  # actually apply patch file to the current working tree

CLI multitasking

> nohup <command> &   # run process in background
> kill -19 <PID>      # or C-z on running process to suspend it
> jobs                # list background processes
> bg %<process_#>     # resumes execution of a suspended process without bringing it to the foreground AKA kill -18 <PID>
> fg %<process_#>     # resumes execution of a suspended process by bringing it to the foreground
> kill %<process_#>   # terminate process with number

Simple scheduling

> <command> | at 1245 today            # run command today at 12:45
> at 1245 oct 10                       # schedule list of commands C-d to finish & save
> atq                                  # queue of scheduled commands
> at -c <jobnum>                       # shows the environment and job at the bottom
> atrm <jobnum>                        # terminate scheduled command in queue
> pushover "Buy milk!" | at 1830 today # set scheduled push notification (for more details see `pushover` tool in `Tools` section)

omg's People

Contributors

smileart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.