Skip to content

Instantly share code, notes, and snippets.

@cpappen
cpappen / gist:b91c4f1bf3431f1d3195037432edb172
Last active June 30, 2016 12:32
find when the system was installed on machine
sudo dumpe2fs $(mount | grep 'on \/ ' | awk '{print $1}') | grep 'Filesystem created:'
ls -alct /|tail -1|awk '{print $6, $7, $8}'
@cpappen
cpappen / gist:8006b53a2e8103d47534201b3a0d5548
Last active June 26, 2016 13:26
Converting antergos to arch
#Removing packages from antergos repository (fish shell)
$ sudo pacman -R (paclist antergos | awk '{print $1}')
# Then editing /etc/pacman.conf to comment out antergos section
# Then updating the system
$ sudo pacman -Syu
There are some you can disable using the unity-tweak-tool.
install:
sudo apt-get update
sudo apt-get install unity-tweak-tool
run:
unity-tweak-tool &
Click on general and turn desktop magnification to off, set texture quality to fast, set window animations to off.
@cpappen
cpappen / .vimrc
Created May 3, 2016 04:07
GNOME Terminal supports 256 colors, but doesn't advertise its support. You can override vim's autodetection by putting the following in your ~/.vimrc
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
@cpappen
cpappen / Disable services that you don't need
Last active April 28, 2016 14:58
windows7services.txt
WINDOWS + R > msconfig > services
Bitlocker Drive Encryption Service
Bluetooth Support Service
Computer Brownser
Disk Defragmenter
Fax
HomeGroup Listener
HomeGroup Provider
IP Helper
@cpappen
cpappen / update-time.sh
Created April 18, 2016 11:39
update time in ubuntu 16.04
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
#!/bin/bash
update_system()
{
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
}
clean_system()
sudo sh -c 'echo "deb http://archive.canonical.com/ubuntu/ $(lsb_release -sc) partner" >> /etc/apt/sources.list.d/canonical_partner.list'
sudo sh -c 'echo "deb-src http://archive.canonical.com/ubuntu/ $(lsb_release -sc) partner" >> /etc/apt/sources.list.d/canonical_partner.list'
sudo apt-get install --install-recommends linux-generic-lts-wily xserver-xorg-core-lts-wily xserver-xorg-lts-wily xserver-xorg-video-all-lts-wily xserver-xorg-input-all-lts-wily libwayland-egl1-mesa-lts-wily
yav -u https://github.com/gorodinskiy/vim-coloresque
Ubuntu:
sudo sed -i 's/UTC=yes/UTC=no/' /etc/default/rcS
Windows:
sc config w32time start= disabled