Skip to content

Instantly share code, notes, and snippets.

View graphicagenda's full-sized avatar
🥳
Just upgraded to GIt Pro

Shining Bright Diamond graphicagenda

🥳
Just upgraded to GIt Pro
View GitHub Profile
@graphicagenda
graphicagenda / du-
Last active November 29, 2019 22:34
[Shell Directory Commands] #shell #SingleLineFunctions #LegacyGISTS
du -sh -- * #Retrieves listing of folder sizes inside a shell directory
@graphicagenda
graphicagenda / gist:1294965
Last active November 29, 2019 22:34
[su shell and usermod] #LegacyGISTS #shell
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
@graphicagenda
graphicagenda / gist:1297322
Last active November 29, 2019 22:35
[zipping in shell] #LegacyGISTS
Tar/Gzip: tar -cz -f {filename}
Better Tar: tar -zcvf archive-name.tar.gz directory-name
UnTar/GZip: tar -xz --directory={directory} -f {filename}
@graphicagenda
graphicagenda / gist:1297410
Last active November 29, 2019 22:36
[.bashrc] #LegacyGISTS
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias foldersize="du -sh -- *"
alias search=grep
alias print="lpr -P"
@graphicagenda
graphicagenda / gist:1297716
Last active November 29, 2019 22:36
[copy from shell] #LegacyGISTS
# MAC
pbcopy < ~/.ssh/id_rsa.pub
# SSH
xclip -sel clip < ~/.ssh/id_rsa.pub
@graphicagenda
graphicagenda / gist:1297729
Last active November 29, 2019 22:36
[git rpm dblock] #LegacyGISTS
[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
@graphicagenda
graphicagenda / gist:1300030
Last active November 29, 2019 22:37
[copy files to another server] #LegacyGISTS
cd /home
scp -r john/ paul@ServerB:/home/paul/john-bak/
@graphicagenda
graphicagenda / future_core_login.php
Last active November 29, 2019 22:37 — forked from franz-josef-kaiser/future_core_login.php
[A WordPress plugin to build an environment to develop a single stylesheet for the login/reg/pass screen in WP 3.1] #LegacyGISTS
<?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
*
@graphicagenda
graphicagenda / gist:1530030
Last active November 29, 2019 22:37
[AGENDA WPCO Colorbox] #LegacyGISTS
// @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}
@graphicagenda
graphicagenda / gist:2154264
Last active November 29, 2019 22:38
[Genesis Custom Body Class] #LegacyGISTS
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;
}