Author:
erics , January 28th, 2015
As per ARS Technica: “An extremely critical vulnerability affecting most Linux distributions gives attackers the ability to execute malicious code on servers used to deliver e-mail, host webpages, and carry out other vital functions.” To patch, run: yum update glibc Article: http://arstechnica.com/security/2015/01/highly-critical-ghost-allowing-code-execution-affects-most-linux-systems/ Amazon Alert: https://alas.aws.amazon.com/ALAS-2015-473.html Original Advisory: http://www.openwall.com/lists/oss-security/2015/01/27/9
Categories: How-To's , Technology Tags: AWS , Buffer , Buffer Overflow , gethostbyname , Ghost , glibc , howto , Linux , Overflow , patch , tips , Vulnerability , Yum
| No comments
Author:
erics , January 27th, 2015
yum install nc SERVER-SIDE: host1 shell> echo hello | nc -l 3456 CLIENT-SIDE: host2 shell> nc host1 3456 hello ~or~ CLIENT-SIDE: yum install telnet host1 shell> telnet host2 {PORT}
Categories: How-To's , Technology Tags: howto , nc , netcat , Network , Network Port , Port , Testing , tips , Yum
| No comments
Author:
erics , January 19th, 2015
Simple Link
$ redirect = ( is_home ( ) ) ? false : get_permalink ( ) ;
if ( is_user_logged_in ( ) ) {
$ link = '<a href="' . wp_logout_url ( $ redirect ) . '" title="Log Out">Log Out</a>' ;
} else {
$ link = '<a href="' . wp_login_url ( $ redirect ) . '" title="Log In">Log In</a>' ;
}
echo $ link ;
Complex Menu Link
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Add login/logout links to a menu
add_filter ( 'wp_nav_menu_items' , 'add_login_logout_to_menu' , 50 , 2 ) ;
function add_login_logout_to_menu ( $ items , $ args ) {
// change theme location with your them location name
$ myMenu = 'secondary' ; // or primary, etc.
if ( is_admin ( ) || $ args -> theme_location != $ myMenu ) {
return $ items ;
}
$ redirect = ( is_home ( ) ) ? false : get_permalink ( ) ;
if ( is_user_logged_in ( ) ) {
$ link = '<a href="' . wp_logout_url ( $ redirect ) . '" title="' . __ ( 'Logout' ) . '">' . __ ( 'Logout' ) . '</a>' ;
} else {
$ link = '<a href="' . wp_login_url ( $ redirect ) . '" title="' . __ ( 'Login' ) . '">' . __ ( 'Login' ) . '</a>' ;
}
$ items . = '<li id="log-in-out-link" class="menu-item menu-type-link">' . $ link . '</li>' ;
return $ items ;
}
Categories: How-To's , Technology Tags: add_filter , howto , Link , login , Login/Logout , Logout , Menu , tips , WordPress , wp_nav_menu_items
| No comments
Author:
erics , January 1st, 2015
awk ‘{sum+=$1}END{print sum}’ inputFile
Categories: How-To's , Technology Tags: Add , AWK , bash , Command line , howto , Math , Shell , Sum , tips
| No comments