-
-
Save rixtox/6697e02ababd37dc871a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g default-terminal "xterm-256color" | |
set-option -g prefix M-n | |
set-window-option -g mode-keys emacs | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind M-n send-prefix | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "updating system" | |
emerge --sync | |
emerge -1 portage | |
emerge --deep --update -v @world | |
echo "setting up user" | |
useradd -m -U -s /bin/bash shou | |
usermod -p PpbbebqBxDHWI shou | |
echo "configuring user login" | |
echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDO4yc+C/w379hDQghCHPS/i9Qbfbj96VGJTiY49ED8A1arJ65rMEmELJ+8sXU0Seq1Q670209fzGWbtRnYmr3GNvO5ZBCWljkaopdeGEurOhWnkL57OvSH4pibLDKG+sxt48dBpUdPN6SKsRBChFeFhn2Uk/xsRN8x9bRi905ATR+s1ZsgbWfQwPGB+oXW8GbOw5+7z1BTWWk+MoxruU5fQV9M0IjBl7IG6qhLkrE5PaET+q1hXMR8sZ7yTzWUlwZWawRGFE8HmNCj6jrbcyN1ZFEvWUwl24GouNv/0mgMFHP10DSNzSda0rdorvv3nN5F1g3OLS61lwnJm0kUJv7B [email protected] > ~shou/.ssh/authorized_keys | |
chmod 600 ~shou/.ssh/authorized_keys | |
chown shou:shou ~shou/.ssh/authorized_keys | |
echo "configuring sudo" | |
emerge -v sudo | |
groupadd -r -f sudo | |
sed -i 's/# %sudo/%sudo/' /etc/sudoers | |
usermod -a -G sudo shou | |
echo "disabling ssh password login" | |
usermod -p $(openssl passwd -crypt $(openssl rand -base64 6)) root | |
echo 'ChallengeResponseAuthentication no' >> /etc/ssh/sshd_config | |
echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config | |
echo 'UsePAM no' >> /etc/ssh/sshd_config | |
# echo 'RUBY_TARGETS="ruby20 ruby22"' >> /etc/portage/make.conf | |
echo "installing utilities" | |
emerge -v git emacs vim net-misc/curl mosh tmux htop docker | |
curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
echo "configuring tools" | |
sudo -u shou curl -L# -o ~shou/.tmux.conf https://gist.githubusercontent.com/shouya/0b007e7941dea6d3b116/raw/.tmux.conf | |
sudo -u shou mkdir -p ~shou/.config/htop | |
sudo -u shou curl -L# -o ~shou/.config/htop/htoprc https://gist.githubusercontent.com/shouya/0b007e7941dea6d3b116/raw/htoprc | |
/etc/init.d/ssh restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Beware! This file is rewritten by htop when settings are changed in the interface. | |
# The parser is also very primitive, and not human-friendly. | |
fields=0 48 3 18 38 39 40 2 46 47 49 37 1 | |
sort_key=46 | |
sort_direction=1 | |
hide_threads=1 | |
hide_kernel_threads=1 | |
hide_userland_threads=1 | |
shadow_other_users=0 | |
show_thread_names=0 | |
highlight_base_name=1 | |
highlight_megabytes=1 | |
highlight_threads=1 | |
tree_view=0 | |
header_margin=1 | |
detailed_cpu_time=0 | |
cpu_count_from_zero=1 | |
update_process_names=0 | |
account_guest_in_cpu_meter=0 | |
color_scheme=2 | |
delay=15 | |
left_meters=LeftCPUs2 RightCPUs2 CPU | |
left_meter_modes=1 1 3 | |
right_meters=LoadAverage Uptime Battery Memory Tasks | |
right_meter_modes=2 2 2 1 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "updating source" | |
apt-get update | |
echo "setting up system" | |
echo nebula > /etc/hostname | |
echo 127.0.0.1 nebula > /etc/hosts | |
echo "setting up user" | |
useradd -m -U -s /bin/bash shou | |
usermod -p PpbbebqBxDHWI shou | |
usermod -a -G sudo shou | |
useradd -m -U -s /bin/bash rix | |
usermod -a -G sudo rix | |
echo "configuring user login" | |
mkdir -p ~shou/.ssh && chmod 700 ~shou/.ssh && chown shou:shou ~shou/.ssh | |
echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDO4yc+C/w379hDQghCHPS/i9Qbfbj96VGJTiY49ED8A1arJ65rMEmELJ+8sXU0Seq1Q670209fzGWbtRnYmr3GNvO5ZBCWljkaopdeGEurOhWnkL57OvSH4pibLDKG+sxt48dBpUdPN6SKsRBChFeFhn2Uk/xsRN8x9bRi905ATR+s1ZsgbWfQwPGB+oXW8GbOw5+7z1BTWWk+MoxruU5fQV9M0IjBl7IG6qhLkrE5PaET+q1hXMR8sZ7yTzWUlwZWawRGFE8HmNCj6jrbcyN1ZFEvWUwl24GouNv/0mgMFHP10DSNzSda0rdorvv3nN5F1g3OLS61lwnJm0kUJv7B [email protected] > ~shou/.ssh/authorized_keys | |
chmod 600 ~shou/.ssh/authorized_keys | |
chown shou:shou ~shou/.ssh/authorized_keys | |
mkdir -p ~rix/.ssh && chmod 700 ~rix/.ssh && chown rix:rix ~rix/.ssh | |
echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbX+wzQU6/Jq2Ot9XvPEgMOCsLw60I4xDW+hiUQBcRwwZ6EW1WGF+za5PNLCbdzxlpFRHRoDd2lef6ZvC5i4sPVX94Yn9pdpCoqVp5cnvny53IsWCHabx+JzLHbCFakIeHla2VksxXKUnUW6by+E1IWkUi4QqRBowcjb7v5oqsfz36xdLs3SHN0LQFloquLAGnd1H5IF7itTD1vOBTHherKIsmBKCB4sQz38M113d8GWkSzIaa2ZbaAVwpMxl1ppMERsOTh4kycFhs4DXNfMWWRj28y5BRT948oziZ4wpsQ2KD2p0e4jcpY0Ho/9ikqVYXLQgNNCBP3IDlGLYZeEfRH+aVfpqXHfXezAT2FA9U0gHGZkyFqcJ4iPaihWhbLxEnpixFLKxm0RKqzNV7+le7jDC5mrhDBLfbnbkzRSDDCVutpUGfLKUonLc2XKYYBM3Pr+UjpwCpBaskNcnzuly42NmoYKNjQpQzcIGFKddWxX5MOeyrtno1NDZy4DnjLHRSvUjLBfOoJTSjVF2lHTGuaE0/bXvvF9Y77D6rNYQZen34H/DiDklKyxbmBJsqCFSokqRR0HCR8IPXJ2BS4DiMbtYGclWVnoQm17e2rS1PI1tbQadSbwjSHudBUP9oUr7JVL+htkZVxbRGzpjyMbRmSB1fZQ2qME6+bjJ/mBlFUw== rix@RixMac | |
chmod 600 ~rix/.ssh/authorized_keys | |
chown rix:rix ~rix/.ssh/authorized_keys | |
echo "disabling ssh password login" | |
usermod -p $(openssl passwd -crypt $(openssl rand -base64 6)) root | |
echo 'ChallengeResponseAuthentication no' >> /etc/ssh/sshd_config | |
echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config | |
echo 'UsePAM no' >> /etc/ssh/sshd_config | |
service ssh restart | |
echo "installing utilities" | |
apt-get install -y emacs vim curl mosh tmux htop docker docker.io sudo build-essential | |
apt-get install -y ruby ruby-dev ghc | |
echo "configuring tools" | |
sudo -u shou curl -L# -o ~shou/.tmux.conf https://gist.githubusercontent.com/shouya/0b007e7941dea6d3b116/raw/.tmux.conf | |
sudo -u shou mkdir -p ~shou/.config/htop | |
sudo -u shou curl -L# -o ~shou/.config/htop/htoprc https://gist.githubusercontent.com/shouya/0b007e7941dea6d3b116/raw/htoprc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment