Download the latest Raspian here. Burn the image to an SD card using Etcher.io or similar.
We wish to set up the Raspberry Pi as a WiFi hotspot. In the boot
sector of the image,
function debounce(callback, wait) {
let timeout;
return (...args) => {
const context = this;
clearTimeout(timeout);
timeout = setTimeout(() => callback.apply(context, args), wait);
};
}
/Volumes/boot
wpa_supplicant.conf
country=US # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="YOUR_NETWORK_NAME"
To start and stop the database server:
pg_ctl -D /usr/local/var/postgres start
pg_ctl -D /usr/local/var/postgres stop
To create and drop a database:
The simplest solution for password-less git access would be to use the git remote set-url command and set an SSH url for the existing repo.
git remote set-url origin [email protected]:name/repo
Then you should be able to git push origin
without being asked for a password.
# Command line prompt should be reasonable. | |
export PS1="$\w> " | |
# Reasonable coloring of directories, etc. | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
# added by Anaconda3 5.2.0 installer | |
export PATH="/Users/mjl/anaconda3/bin:$PATH" |
set -g status-keys vi | |
setw -g mode-keys vi | |
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | |
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | |
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" | |
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" |
" Here are the basics. | |
map Q <Nop> | |
if has('python3') | |
silent! python3 1 | |
endif | |
imap jk <ESC> | |
" nnoremap <Leader>w <ESC>:w<CR> | |
set number | |
set relativenumber | |
set shell=bash\ -l " vim shell should behave like my usual shell. |
To grab frames from a video:
ffmpeg -y -i "xdfo.wmv" -qscale 0 -r 30 "./xdfo/xdfo.%05d.jpg"
To do the reverse, to generate a movie from a sequence of frames:
ffmpeg -f image2 -r 30 -i img.%04d.png -vb 20M -vcodec mpeg4 -y movie_filtered.mp4
" Here are the basics. | |
imap jk <ESC> | |
" nnoremap <Leader>w <ESC>:w<CR> | |
set number | |
set relativenumber | |
set shell=bash\ -l " vim shell should behave like my usual shell. | |
set noswapfile " Get rid of these things; big problems. | |
map <Leader>] :noh <CR> | |
map <Leader>[ :StripWhitespace <CR> | |
map <Space>w :w <CR> |