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
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
echo .DS_Store >> .gitignore |
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
# add this ppa | |
sudo add-apt-repository ppa:nilarimogard/webupd8 | |
sudo apt-get update | |
# install launchpad-getkeys | |
sudo apt-get install launchpad-getkeys | |
# run it | |
sudo launchpad-getkeys |
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
<?php | |
function utf8_encode_deep(&$input) { | |
if (is_string($input)) { | |
$input = utf8_encode($input); | |
} else if (is_array($input)) { | |
foreach ($input as &$value) { | |
utf8_encode_deep($value); | |
} | |
unset($value); |
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
gsettings set org.pantheon.desktop.gala.keybindings switch-input-source "['<Alt>Shift_L', '<Alt>Shift_R', '<Shift>Alt_L', '<Shift>Alt_R']" |
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
function getUrlVars() | |
{ | |
var vars = {}, hash; | |
var hashes = window.location.toString().slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) | |
{ | |
hash = hashes[i].split('='); | |
vars[hash[0]] = hash[1]; | |
} |
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
if(!Date.prototype.toLocaleFormat){ | |
Date.prototype.toLocaleFormat = function(format) { | |
var f = { | |
Y : this.getFullYear(), | |
y : this.getFullYear()-(this.getFullYear()>=2e3?2e3:1900), | |
m : this.getMonth() + 1, | |
d : this.getDate(), | |
H : this.getHours(), | |
M : this.getMinutes(), | |
S : this.getSeconds() |
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
sudo update-alternatives --config javac | |
sudo update-alternatives --config java |
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
#! /bin/bash | |
wait | |
apt-get update | |
wait | |
apt-get upgrade | |
wait | |
apt-get install php5 php5-xdebug php5-xmlrpc php5-odbc php5-mysql php5-memcache php5-memcached php5-mcrypt php5-intl php5-imap php5-imagick php5-gd php5-curl php5-cli php-pear php-codesniffer | |
wait |
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
sudo apt-add-repository ppa:glasen/intel-driver | |
sudo apt-get update | |
sudo apt-get install xserver-xorg-video-intel | |
#If you use Ubuntu 12.04, then you can enable the 'SNA' feature (disabled by default) of Intel Sandy Bridge architecture which improves #both 2D and 3D performance. For that, enter the below command in your Terminal window to open the text editor with administrative #privileges. (/etc/X11/xorg.conf) | |
Section "Device" | |
Identifier "Card0″ | |
Driver "intel" | |
Option "AccelMethod" "sna" |
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
apt-get install -y ppa-purge | |
add-apt-repository -y ppa:ondrej/php5-oldstable | |
apt-get update | |
ppa-purge ppa:ondrej/php5 | |
apt-get update && apt-get upgrade -y && apt-get autoremove -y && apt-get autoclean -y |
NewerOlder