Skip to content

Instantly share code, notes, and snippets.

@moonwatcher
Last active March 23, 2020 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moonwatcher/b2f3efc4ddfca22c1cac24aabba9abd0 to your computer and use it in GitHub Desktop.
Save moonwatcher/b2f3efc4ddfca22c1cac24aabba9abd0 to your computer and use it in GitHub Desktop.
export PATH=/root/.bin:/usr/local/bin:/usr/local/sbin:$PATH
export PS1="\e[1m\h\e[m:\w \u% "
alias ls="ls --color=none"
export HTOPRC=/tmp/.htoprc
#!/bin/zsh
typeset -U path
path=( ~/.bin /usr/local/bin /usr/local/sbin $path )
export LC_CTYPE=en_US.UTF-8
export HTOPRC=/volume/luna/root/.htoprc
#!/bin/zsh
setopt nobeep extendedglob nomultios
fpath=(~/.zsh-completions /usr/local/share/zsh-completions $fpath)
# Shell prompt
PS1="%B%m%b:%1~ %n%# "
RPS1=" %~"
# Default Editor
EDITOR=nano
# History
setopt sharehistory histignorealldups histreduceblanks histignorespace
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=/volume/luna/root/.zsh_history
# TerminalTERM=xterm
# Directory navigation
setopt autocd autopushd
DIRSTACKSIZE=1000
typeset -U cdpath; cdpath=(. $cdpath)
autoload -U compinit;
compinit -u -d /volume/luna/root/.zsh_compdump
#!/bin/sh
# in /usr/local/bin/cleanconfig
rm /etc/config/*-opkg 2> /dev/null
mkdir -p /tmp/cleanconfig;
(
cd /etc/config;
for x in *
do
uci export $x > /tmp/cleanconfig/$x
cat /tmp/cleanconfig/$x | uci import
done
)
rm -rf /tmp/cleanconfig;
config global
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '1'
config mount
option target '/volume/luna'
option uuid '8745d5ad-e101-4659-b582-eb9f3b792d09'
option enabled '1'
#/bin/sh
# in /usr/local/bin/post_upgrade
opkg update;
opkg install \
blkid \
block-mount \
curl \
e2fsprogs \
fdisk \
htop \
iwinfo \
kmod-ata-ahci \
kmod-fs-ext4 \
kmod-usb-ehci \
kmod-usb-ohci \
kmod-usb-storage \
kmod-usb-storage-uas \
kmod-usb2 \
kmod-usb3 \
luci \
mount-utils \
nano \
openssh-client \
openssh-client-utils \
openssh-keygen \
openssh-server \
openvpn-openssl \
pv \
rsync \
smartmontools \
tmux \
uhttpd \
zsh;
# opkg install \
# kmod-ath10k \
# ath10k-firmware-qca9984;
# opkg install \
# kmod-ath10k-ct \
# ath10k-firmware-qca9984-ct \
# ath10k-firmware-qca9984-ct-htt;
cleanconfig;
wifi;
/etc/init.d/openvpn enable;
/etc/init.d/openvpn restart;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment