zeldor.biz

Linux, programming and more

Copyright © 2026
Log in

Archives for October 2010

Aptitude search

October 31, 2010 by Igor Drobot Leave a Comment

Very useful search hack for aptitude, to compare package versions. Normaly you see the versions if you open aptitude and it takes to much time.

1
aptitude search virtualbox -F '%p%V'

aptitude search virtualbox -F '%p%V'

Filed Under: Bash, Linux Tagged With: aptitude, aptitude search

Top funny source code comments

October 31, 2010 by Igor Drobot Leave a Comment

Some funny comments from different codes found around the net:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
 * OK; before you read the following code know what I am trying to do.
 * I needed to get the list of child catagories from the root node so that
 * the root node didn't appear in the selection box. But for some stupid
 * fucking reason the stupid fucking DBA wont let me access the items using
 * indices and I instead have to use their stupid fucking Iterator
 * implementation. So there.
 */
$firstList = $this->getRootNode()->getChildren();
foreach ($firstList as $node)
{
    $nodes = $node->getChildren();
    break;                // wtf?
}

/* * OK; before you read the following code know what I am trying to do. * I needed to get the list of child catagories from the root node so that * the root node didn't appear in the selection box. But for some stupid * fucking reason the stupid fucking DBA wont let me access the items using * indices and I instead have to use their stupid fucking Iterator * implementation. So there. */ $firstList = $this->getRootNode()->getChildren(); foreach ($firstList as $node) { $nodes = $node->getChildren(); break; // wtf? }

1
// if i ever see this again i'm going to start bringing guns to work

// if i ever see this again i'm going to start bringing guns to work

[Read more…]

Filed Under: Fun, Linux Tagged With: Funny code

Installing Remote Server Administration Tools for Windows 7

October 30, 2010 by Igor Drobot 1 Comment

Microsoft Remote Server Administration Tools enables IT administrators to remotely manage roles and features in Windows Server 2008 from a computer running Windows Vista or Windows 7. It includes support for remote management of computers running either a Server Core installation or the full installation option of Windows Server 2008. It provides same functionality to Windows Server 2003 Administration Tools Pack
[Read more…]

Filed Under: Windows Tagged With: RSAT

Secure Cisco devices

October 19, 2010 by Igor Drobot Leave a Comment

Some cisco basic command to secure your device against logins.
You should execute this command always on your routers/switches.
DonĀ“t forget to replace the “cisco” password!

Set a console password to cisco:

1
2
3
Router(config)#line con 0
Router(config-line)#login
Router(config-line)#password cisco

Router(config)#line con 0 Router(config-line)#login Router(config-line)#password cisco

Set a telnet password:

1
2
3
Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password cisco

Router(config)#line vty 0 4 Router(config-line)#login Router(config-line)#password cisco

Stop console timing out:

1
2
Router(config)#line con 0
Router(config-line)#exec-timeout 0 0

Router(config)#line con 0 Router(config-line)#exec-timeout 0 0

Set the enable password to cisco:

1
2
3
4
Router(config)#enable password cisco
Router(config)#enable secret class
# No Plain-Text passwords more
Router(config)#service password-encryption

Router(config)#enable password cisco Router(config)#enable secret class # No Plain-Text passwords more Router(config)#service password-encryption

Filed Under: Cisco Tagged With: Cisco Router Security, Secure Telnet

‘Argument list too long’

October 18, 2010 by Igor Drobot Leave a Comment


root@web2:$ rm pe-warn-*.bz2
-bash: /bin/rm: Argument list too long

This peoblem happens when you are trying to delete too many files in a directory at the same time – it seems rm has special limits …

To solve the problem:
Use:

1
find . -name 'pe-warn-*.bz2' | xargs rm

find . -name 'pe-warn-*.bz2' | xargs rm

or

1
find . -name "pe-warn-*.bz2" -delete

find . -name "pe-warn-*.bz2" -delete

Filed Under: Bash, Debian, Linux, Ubuntu Tagged With: bash, limit, rm

  • 1
  • 2
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.