~/.asoundrc
pcm.!default {
type hw
card CODEC
}
ctl.!default {
type hw
card CODEC
}
~/.asoundrc
pcm.!default {
type hw
card CODEC
}
ctl.!default {
type hw
card CODEC
}
# sudo nano /etc/modprobe.d/sound.conf | |
options snd-hda-intel model=thinkpad |
In order to get external displays working on Fedora 17+ with recent Lenovo laptops containing Optimus graphics you need to perform a few steps. | |
1. Enter bios, go to Config > Display | |
2. Change display to Discrete graphics (disable Optimus since Linux doesn't support it yet) | |
3. Set the default boot screen to Digital on Dock (if you have one) | |
4. Reboot | |
5. At grub2 loading screen, hit e to edit the boot params | |
6. Find the line that starts with `linux` and add ` nox2apic` to the end of it | |
7. Boot linux (ctrl-x maybe?) | |
8. Once booted and logged in, run `sudo nano /etc/default/grub` from the terminal |
apachectl stop | |
/root/src/postgresql-9.2.0/src/bin/pg_dump/pg_dumpall > /root/pgsql.backup | |
/etc/init.d/postgresql stop | |
mv /usr/local/pgsql /usr/local/pgsql.bak | |
cd /root/src/postgresql-9.2.0 | |
make install | |
su postgres | |
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data | |
exit |
#!/bin/bash | |
PORT=3000 | |
while [[ $(netstat -lnt | grep ":$PORT ") != "" ]]; do | |
PORT=$(($PORT + 1)) | |
done | |
rails server -p $PORT & | |
SERVEPID=$! |
Packages/User/Preferences.sublime-settings | |
{ | |
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme", | |
"font_size": 14.0 | |
} | |
Packages/User/Default.sublime-commands | |
[ | |
{ | |
"caption": "CSS rules compact", |
# Fedora | |
yum install make automake gcc gcc-c++ openssl-devel | |
# Ubuntu | |
apt-get install build-essential libssl-dev | |
# Both | |
curl -sS http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tar.bz2 > Python-2.6.6.tar.bz2 | |
tar xvfj Python-2.6.6.tar.bz2 | |
cd Python-2.6.6 |
# Based on: | |
# http://hacktux.com/fedora/source/rpm | |
# http://fedoraproject.org/wiki/Chromium | |
# http://codereview.chromium.org/7562022/patch/1/2 | |
# as root | |
cd /etc/yum.repos.d/ | |
wget http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-chromium-stable.repo | |
yum -y install yum-utils rpmdevtools elfutils-libeld-devel libXt-devel | |
exit |
sudo -s | |
yum install nano | |
nano /etc/selinux/config # disable | |
reboot | |
# clean dock | |
sudo -s | |
yum update |
import sublime | |
sublime.active_window().run_command('sftp_upload_file', {'paths': ['/path/to/file']}) |