Skip to content

Instantly share code, notes, and snippets.

@florentdestremau
Last active September 7, 2018 10:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florentdestremau/ec0a84adb2b95a92b2f2566b2c03e4c4 to your computer and use it in GitHub Desktop.
Save florentdestremau/ec0a84adb2b95a92b2f2566b2c03e4c4 to your computer and use it in GitHub Desktop.
Initial setup on a thinkpad X260. Manually installing Chrome and Phpstorm aside. Download and run
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install git zsh tig curl vim htop vlc tlp tlp-rdw build-essential automake
# Battery management
sudo tlp start
# install node js
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
# install yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get -y install yarn
# install atom
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update && sudo apt-get -y install atom
# install php
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get -y install php7.1 php7.1-gd php7.1-curl php7.1-xml php7.1-cli php7.1-intl php7.1-pgsql php7.1-mysql php7.1-sqlite php7.1-mbstring php7.1-bcmath
# install composer
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
# Install docker
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
sudo usermod -aG docker $USER
# Better audio
echo "# Use PulseAudio plugin hw
pcm.!default {
type plug
slave.pcm hw
}" >> ~/.asoundrc
echo "
default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq
enable-lfe-remixing = no
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
rlimit-rtprio = 9
daemonize = no
" > ~/.config/pulse/daemon.conf
# Restart sound
pulseaudio -k
pusleaudio --start
sudo alsa reload
# PHPSTORM tweak
sudo sh -c 'echo "fs.inotify.max_user_watches = 524288" >> /etc/sysctl.d/idea.conf'
sudo sysctl -p --system
# 1. Add the Spotify repository signing keys to be able to verify downloaded packages
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 931FF8E79F0876134EDDBDCCA87FF9DF48BF1C90
# 2. Add the Spotify repository
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
# 3. Update list of available packages
sudo apt-get update
# 4. Install Spotify
sudo apt-get install spotify-client
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo 'alias nrun="nanobox run"' >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment