Skip to content

Instantly share code, notes, and snippets.

@swapi
Forked from sandys/T430S configuration
Created April 18, 2014 12:52
Show Gist options
  • Save swapi/11042648 to your computer and use it in GitHub Desktop.
Save swapi/11042648 to your computer and use it in GitHub Desktop.
#run this in bash. somehow the wildcards dont work on zsh
#for nemo file manager instead of nautilus
sudo add-apt-repository ppa:noobslab/mint
#for latest git.
sudo apt-add-repository ppa:git-core/ppa
#for gnome-shell... cos unity will suck up all your memory
#plus https://extensions.gnome.org/ !!!
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell synaptic lm-sensors cpufrequtils openssh-server ppa-purge vim-gnome git nemo vlc libstdc++6:i386 ia32-libs aptitude
sudo apt-get remove zeitgeist* zeitgeist-core zeitgeist-datahub python-zeitgeist rhythmbox-plugin-zeitgeist geoclue geoclue-ubuntu-geoip geoip-database ubuntuone* whoopsie ubuntuone-client* python-ubuntuone-storage* ubuntuone-installer* menu apt-xapian-index oneconf deja-dup indicator-messages telepathy-indicator software-center totem rhythmbox menu rhythmbox-plugin-zeitgeist liboverlay-scrollbar* nautilus update-manager
sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/geany 10
#for java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get install oracle-java7-installer
# ~~ DEPRECATED download -pf kernel and install it (64-bit linked below)
# http://repos.natalenko.name/debian/pf/linux-image-3.8.2-pf_1_amd64.deb
# http://repos.natalenko.name/debian/pf/linux-headers-3.8.2-pf_1_amd64.deb~~
#install 3.12 kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-trusty/
sudo apt-get autoremove
sudo apt-get autoclean
#Aptitude is a better apt-get
#make aptitude aware of all installed packages
sudo aptitude keep-all
#at the end to remove all orphaned startup entries, icons, etc.
aptitude -F %p search '~c' | xargs sudo dpkg -P
#for bittorrent
sudo apt-get install transmission
#for Virtualbox
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise contrib" >> /etc/apt/sources.list.d/virtualbox.list'
sudo apt-get update
sudo apt-get install dkms
#download http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/virtualbox-4.3_4.3.0-89960~Ubuntu~precise_amd64.deb
#download http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/Oracle_VM_VirtualBox_Extension_Pack-4.3.0.vbox-extpack
sudo dpkg -i virtualbox-4.3_4.3.0-89960\~Ubuntu\~precise_amd64.deb
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-4.3.0.vbox-extpack
#enable USB passthrough and 2.0 AHCI
#for docker
#you need to use docker version 0.7 onwards because it will complain about missing AUFS on all kernels above 3.5 otherwise
http://test.docker.io | sudo sh
#copy the sudoers file below to /etc/sudoers
#performance tweaks
#~~DEPRECATED because of http://lwn.net/Articles/545244/ - sudo apt-get install zram-config~~
# ~~ DEPRECATED ALSO - add "zcache" to "/etc/default/grub"'s GRUB_CMDLINE_LINUX_DEFAULT
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zcache" ~~
#enable zswap https://www.kernel.org/doc/Documentation/vm/zswap.txt http://www.phoronix.com/scan.php?page=news_item&px=MTQwODI
# make sure you are running kernel >3.11 and add "zswap.enabled=1" to "/etc/default/grub"'s GRUB_CMDLINE_LINUX_DEFAULT
#verify swap by "dmesg | grep zswap". you should see "zswap: loading zswap"
# to check zswap performance - check /sys/kernel/debug/frontswap/succ_stores, if succ_stores is
#0 it means that the memory pressure is still not heavy and none pages need be swapped out.
# or do "sudo grep . -Ir /sys/kernel/debug/zswap/"
#add noatime to all filesystems
#UUID=735916a6-35e3-4e9f-b2b4-cff955e0c10f /home ext4 defaults,noatime
#verify it installed by cat /proc/swaps - you should see /dev/zram{#} entries with a non-zero priority. hard disks should be set
# with negative priority
sudo sensors-detect
#make sure coretemp is added to /etc/modules (happens automatically)
#wifi fixes for 11n wifi
echo "options iwlwifi 11n_disable=1 swcrypto=1" | sudo tee -a /etc/modprobe.d/iwlwifi.conf
# to test immediately try "sudo modprobe -rv iwldvm && sudo modprobe -v iwldvm" and then "iwconfig"
#change
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
#hosts: files dns
#to rebuild final grub config
sudo update-grub
#reboot
#remount filesystems sudo mount -o remount /dev/sda4
#run this in bash. somehow the wildcards dont work on zsh
#for gnome-shell... cos unity will suck up all your memory
#plus https://extensions.gnome.org/ !!!
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell synaptic lm-sensors cpufrequtils openssh-server ppa-purge vim-gnome git nemo vlc aptitude geany transmission
#for Oracle java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get install oracle-java7-installer
#for python dev
sudo apt-get install python-dev
# use this for Ruby http://www.lambdacurry.com/damn-fast-production-ready-ruby-setup/
#Aptitude is a better apt-get
#make aptitude aware of all installed packages
sudo aptitude keep-all
sudo aptitude remove ~nzeitgeist zeitgeist-core zeitgeist-datahub python-zeitgeist rhythmbox-plugin-zeitgeist geoclue geoclue-ubuntu-geoip geoip-database ~nubuntuone whoopsie ~nubuntuone-client ~npython-ubuntuone-storage ~nubuntuone-installer menu apt-xapian-index oneconf deja-dup indicator-messages telepathy-indicator software-center totem rhythmbox menu rhythmbox-plugin-zeitgeist ~nliboverlay-scrollbar nautilus update-manager
sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/geany 10
#at the end to remove all orphaned startup entries, icons, etc.
aptitude -F %p search '~c' | xargs sudo dpkg -P
#aptitude equivalent of apt-get autoremove... completely non-obvious
sudo aptitude -oAptitude::Delete-Unused=1 install
#for Virtualbox
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian precise contrib" >> /etc/apt/sources.list.d/virtualbox.list'
sudo apt-get update
sudo apt-get install dkms
#download http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/virtualbox-4.3_4.3.0-89960~Ubuntu~precise_amd64.deb
#download http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/Oracle_VM_VirtualBox_Extension_Pack-4.3.0.vbox-extpack
sudo dpkg -i virtualbox-4.3_4.3.0-89960\~Ubuntu\~precise_amd64.deb
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-4.3.0.vbox-extpack
#enable USB passthrough and 2.0 AHCI
#for docker
sudo aptitude install docker.io
#copy the sudoers file below to /etc/sudoers
#performance tweaks
#~~DEPRECATED because of http://lwn.net/Articles/545244/ - sudo apt-get install zram-config~~
#~~DEPRECATEDverify it installed by cat /proc/swaps - you should see /dev/zram{#} entries with a non-zero priority. hard disks should be set
#~~DEPRECATED with negative priority
# ~~ DEPRECATED ALSO - add "zcache" to "/etc/default/grub"'s GRUB_CMDLINE_LINUX_DEFAULT
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zcache" ~~
#enable zswap https://www.kernel.org/doc/Documentation/vm/zswap.txt http://www.phoronix.com/scan.php?page=news_item&px=MTQwODI
# make sure you are running kernel >3.11 and add "zswap.enabled=1" to "/etc/default/grub"'s GRUB_CMDLINE_LINUX_DEFAULT
#verify swap by "dmesg | grep zswap". you should see "zswap: loading zswap"
# to check zswap performance - check /sys/kernel/debug/frontswap/succ_stores, if succ_stores is
#0 it means that the memory pressure is still not heavy and none pages need be swapped out.
# or do "sudo grep . -Ir /sys/kernel/debug/zswap/"
#add noatime to all filesystems
#UUID=735916a6-35e3-4e9f-b2b4-cff955e0c10f /home ext4 defaults,noatime
sudo sensors-detect
#make sure coretemp is added to /etc/modules (happens automatically)
#wifi fixes for 11n wifi
echo "options iwlwifi 11n_disable=1 swcrypto=1" | sudo tee -a /etc/modprobe.d/iwlwifi.conf
# to test immediately try "sudo modprobe -rv iwldvm && sudo modprobe -v iwldvm" and then "iwconfig"
#change
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
#hosts: files dns
#to rebuild final grub config
sudo update-grub
#reboot
#remount filesystems sudo mount -o remount /dev/sda4
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Cmnd_Alias WHEELER = /usr/bin/lsof, /bin/nice, /bin/ps, /usr/bin/top, /usr/local/bin/nano, /usr/bin/ss, /usr/bin/locate, /usr/bin/find, /usr›
Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/nice, /usr/bin/ionice, /usr/bin/top, /usr/bin/ps
Cmnd_Alias EDITS = /usr/bin/vim, /usr/bin/nano, /usr/bin/cat, /usr/bin/vi
Defaults env_reset,pwfeedback
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Defaults visiblepw, path_info, insults, lecture=always
Defaults loglinelen = 0, logfile =/var/log/sudo.log, log_year, log_host, syslog=auth
Defaults !env_editor, editor="/usr/bin/vim:/usr/bin/vi:/usr/bin/nano"
Defaults passprompt="Sudo invoked by [%u] on [%H] - Cmd run as %U - Password for user %p:"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
ALL ALL = (ALL) ALL, NOPASSWD: WHEELER, NOPASSWD: PROCESSES, NOPASSWD: EDITS
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
vm.swappiness=10
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment