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
slugify=function(str){ | |
str = str.replace(/^\s+|\s+$/g, ''); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc | |
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { | |
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); | |
} |
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
yum install rpm-build cabextract ttmkfdir | |
wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec | |
rpmbuild -bb msttcorefonts-2.5-1.spec | |
rpm -ivh $HOME/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm | |
fc-cache -f -v |
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
#vi /etc/X11/xorg.conf.d/10-synaptics.conf | |
#Supports Horizontal and Vertical Edge Scrolling, Two Finger Right click (tested on Dell XPS) | |
Section "InputClass" | |
Identifier "touchpad" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
Option "TapButton1" "1" | |
Option "TapButton2" "3" | |
Option "VertEdgeScroll" "on" | |
Option "HorizEdgeScroll" "on" |
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
#!/usr/bin/python | |
#SSH into the new server, and run this from the home directory. Granted ~/public_html is the Apache DocumentRoot for | |
#the user | |
import getpass | |
import os | |
print '\nThis script will automate the process of moving a website from one server to another.' |
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
alias ..='cd ..' | |
alias cl="clear; ls" | |
alias ft='find / -type f -exec grep -i $1 {} +' | |
alias gp='git push' | |
alias gpp='git pull; git push' | |
alias gsc='gs; gca' | |
alias gscp='gs; gca; gp' | |
alias gu='git pull' | |
alias jj='java -jar' | |
alias k8000="fuser -k -n tcp 8000" |
NewerOlder