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
du -sh -- * #Retrieves listing of folder sizes inside a shell directory |
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
su - # switch user (root) | |
usermod -d /home/path/ {user} # set the user's home path | |
usermod {user} -s /bin/shell # set the user's shell | |
grep {user} /etc/passwd # find a user's id,group,access |
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
Tar/Gzip: tar -cz -f {filename} | |
Better Tar: tar -zcvf archive-name.tar.gz directory-name | |
UnTar/GZip: tar -xz --directory={directory} -f {filename} |
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
alias rm='rm -i' | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias foldersize="du -sh -- *" | |
alias search=grep | |
alias print="lpr -P" |
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
# MAC | |
pbcopy < ~/.ssh/id_rsa.pub | |
# SSH | |
xclip -sel clip < ~/.ssh/id_rsa.pub |
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
[root@contactagenda lib]# lsof -w -n +D/var/lib/rpm | |
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME | |
rpm 6110 root mem REG 146,85 24576 56529157 /var/lib/rpm/__db.001 | |
rpm 6110 root mem REG 146,85 1318912 56533167 /var/lib/rpm/__db.002 | |
rpm 6110 root mem REG 146,85 663552 56533232 /var/lib/rpm/__db.003 | |
rpm 6110 root 3r REG 146,85 5574656 56527327 /var/lib/rpm/Basenames | |
rpm 6110 root 4rR REG 146,85 33927168 56527321 /var/lib/rpm/Packages | |
rpm 6110 root 5r REG 146,85 12288 56527524 /var/lib/rpm/Pubkeys | |
rpm 6110 root 6r REG 146,85 327680 56527319 /var/lib/rpm/Providename | |
rpm 6110 root 7r REG 146,85 12288 56527329 /var/lib/rpm/Conflictname |
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
cd /home | |
scp -r john/ paul@ServerB:/home/paul/john-bak/ |
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 | |
/** | |
* Plugin Name: Future Core Login | |
* Plugin URI: http://unserkaiser.com | |
* Description: Replacing the current stylesheets loaded on wp-login.php until this ticket goes into core: <a href="http://core.trac.wordpress.org/ticket/12506">#12506</a> | |
* Version: 0.1 | |
* Author: Franz Josef Kaiser | |
* Author URI: http://unserkaiser.com | |
* License: GPL2 | |
* |
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
// @AGENDA {BEGIN} | |
// -- wp_enqueue_script('colorbox', rtrim(get_bloginfo('wpurl'), '/') . '/wp-content/plugins/' . $this -> plugin_name . '/views/' . $theme_folder . '/js/colorbox.js', array('jquery'), false, true); | |
// @AGENDA {END} |
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
add_filter( 'body_class', 'gk_add_body_class' ); | |
function gk_add_body_class( $classes ) { | |
$classes[] = 'custom-class'; | |
$classes[] = $_GET['bg'] == 1 ? 'bg1': ''; | |
$classes[] = $_GET['bg'] == 2 ? 'bg2': ''; | |
$classes[] = $_GET['bg'] == 3 ? 'bg3': ''; | |
$classes[] = $_GET['bg'] == 4 ? 'bg4': ''; | |
return $classes; | |
} |
OlderNewer