This file contains hidden or 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
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w\[\033[1;37m\]$(__git_ps1) \[\033[01;35m\]\$ \[\033[00m\]' |
This file contains hidden or 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
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset | |
# Regular Colors | |
Black="\[\033[0;30m\]" # Black | |
Red="\[\033[0;31m\]" # Red | |
Green="\[\033[0;32m\]" # Green | |
Yellow="\[\033[0;33m\]" # Yellow | |
Blue="\[\033[0;34m\]" # Blue | |
Purple="\[\033[0;35m\]" # Purple |
This file contains hidden or 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
echo "alias fucking=sudo" >> ~/.bashrc # The best alias you'll ever use. Think of the possibilities "fucking reboot" |
This file contains hidden or 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
git reset --hard HEAD~1 | |
git push -f |
This file contains hidden or 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
curl -LSs http://drupalconsole.com/installer | php | |
mv console.phar /usr/local/bin/drupal | |
drupal generate:module |
This file contains hidden or 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
mount /dev/mapper/vg0-root /mnt | |
mount /dev/md0 /mnt/boot | |
mount /dev/mapper/vg0-var /mnt/var | |
mount /dev/mapper/vg0-data /mnt/data | |
mount -t dev -o bind /dev /mnt/dev | |
mount -t proc -o bind /proc /mnt/proc | |
mount -t sys -o bind /sys /mnt/sys | |
chroot /mnt |
This file contains hidden or 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
mysqlcheck -o --all-databases |
This file contains hidden or 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
CREATE TABLE example_table ( | |
nid INT(11) NOT NULL, | |
plain_text_field VARCHAR(32, | |
numeric_field INT(11), | |
boolean_field INT(1), | |
timestamp_field INT(8), | |
PRIMARY KEY(nid) | |
); |
This file contains hidden or 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
git config --global alias.lg 'log --all --graph --decorate --oneline' | |
### OR ### | |
[alias] | |
lg = log --all --graph --decorate --oneline |
This file contains hidden or 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 | |
// @see: https://www.drupal.org/node/150215 | |
/** | |
* Add new fields to 'mytable' table. | |
*/ | |
function MYMODULE_update_7001() { | |
$fields = array( | |
'field_name_1' => array( | |
'description' => 'Field name 1', |