All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.
# run command in the foreground
command
# run commend in the background
sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder |
require 'formula' | |
class BsdgamesOsx < Formula | |
desc 'The classic bsdgames of yore for Mac OS X and macOS.' | |
homepage 'https://github.com/ctdk/bsdgames-osx' | |
url 'https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz' | |
sha256 '699bb294f2c431b9729320f73c7fcd9dcf4226216c15137bb81f7da157bed2a9' | |
head 'https://github.com/ctdk/bsdgames-osx.git' | |
version '2.19.3' | |
depends_on "bsdmake" => ':build' |
vim commands to use pt
as grep command
set grepprg=pt\ --nogroup\ --nocolor
crete Pt
vim command and map it to \
command -nargs=+ -complete=file -bar Pt silent! grep! <args>|cwindow|redraw!
nnoremap \ :Pt
#!/bin/bash | |
############################################################################ | |
# Note: Special network 192.162.50.3 to use Cisco Anyconnect Split tunnel. | |
# | |
# On OX X host you need to add a line (and file) /etc/exports: | |
# /Users -mapall=[youruser]:[yourgroup] [boot2dockerip] | |
# See: https://quip.com/EDYLAAfuup5M (no login needed) | |
# See also: https://github.com/boot2docker/boot2docker/issues/587#issuecomment-66935011 | |
# See also: http://support.apple.com/en-us/HT202243 |
" A minimal vimrc for new vim users to start with. | |
" | |
" Referenced here: http://www.benorenstein.com/blog/your-first-vimrc-should-be-nearly-empty/ | |
" Original Author: Bram Moolenaar <Bram@vim.org> | |
" Made more minimal by: Ben Orenstein | |
" Last change: 2012 Jan 20 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
# To decode: | |
# qp -d string | |
# To encode: | |
# qp string | |
alias qpd='perl -MMIME::QuotedPrint -pe '\''$_=MIME::QuotedPrint::decode($_);'\''' | |
alias qpe='perl -MMIME::QuotedPrint -pe '\''$_=MIME::QuotedPrint::encode($_);'\''' | |
function qp { | |
if [[ "$1" = "-d" ]] | |
then |