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
# Originally from http://highervisibilitywebsites.com/convert-your-mysql-database-myisam-innodb-and-get-ready-drupal-7-same-time | |
mysql -u [USER_NAME] -p -e "SHOW TABLES IN [DATABASE_NAME];" | tail -n +2 | xargs -I '{}' echo "ALTER TABLE {} ENGINE=INNODB;" > alter_table.sql | |
perl -p -i -e 's/(search_[a-z_]+ ENGINE=)INNODB/\1MYISAM/g' alter_table.sql | |
mysql -u [USER_NAME] -p [DATABASE_NAME] < alter_table.sql |
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 | |
OLD_DB=$1 | |
NEW_DB=$2 | |
USER=root | |
read -s -p "MySQL $USER Password: " PASS | |
echo "CREATE DATABASE $2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;" | mysql -u $USER --password=$PASS | |
TABLES=`echo "SHOW TABLES IN $1;" | mysql -NB -u $USER --password=$PASS` |
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
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); |
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
$('#myCarousel').on('slid', function() { | |
var $nextImage = $('.active.item', this).next('.item').find('img'); | |
$nextImage.attr('src', $nextImage.data('lazy-load-src')); | |
}); |
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
// Responsive: Normal desktops | |
// -------------------------------------------------- | |
@media (min-width: 980px) and (max-width: 1199px) { | |
// Fixed grid | |
#grid > .core(@gridColumnWidth980, @gridGutterWidth980); | |
// Fluid grid | |
#grid > .fluid(@fluidGridColumnWidth980, @fluidGridGutterWidth980); |
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
Redhat | |
------ | |
$ sudo yum -y install tcsh scons gcc-c++ glibc-devel openssl-devel git python | |
Ubuntu | |
------ | |
$ sudo apt-get install build-essential libssl-dev curl git-core | |
$ git clone git://github.com/creationix/nvm.git ~/.nvm | |
$ printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc | |
$ NVM_DIR=~/.nvm |
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 gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
$ \curl -sSL https://get.rvm.io | sudo bash -s stable | |
$ sudo usermod -aG rvm ckng | |
(logout and login again) | |
$ rvm install 2.3 | |
$ ruby -v | |
$ gem update --system | |
$ gem install compass |
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-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
$ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list | |
$ sudo apt-get update | |
$ sudo apt-get install mongodb-10gen | |
$ sudo pecl install mongo | |
$ echo 'extension=mongo.so' | sudo tee /etc/php5/conf.d/mongo.ini |
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
VBoxManage.exe setextradata <vm> VBoxInternal2/SharedFoldersEnableSymlinksCreate/<share folder> 1 | |
e.g. | |
VBoxManage.exe setextradata ubuntu-server VBoxInternal2/SharedFoldersEnableSymlinksCreate/www 1 | |
VBoxManage getextradata ubuntu-server enumerate |
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 aptitude install memcached libsasl2-dev libsasl2-2 sasl2-bin libsasl2-2 libsasl2-modules | |
# Install libevent 2.0.21 | |
# may need "sudo apt-get install cloog-ppl" | |
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
$ tar xvfz libevent-2.0.*-stable.tar.gz | |
$ cd libevent-2.0.*-stable | |
$ ./configure; make; make install | |
$ cd ../; rm -rf libevent-2.0.*-stable* |
OlderNewer