The Wiert Corner – irregular stream of Wiert stuff

Jeroen Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20120216-Word-Convert-To-Text

    MPS_6399

    MPS_6398

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 384 other followers

Archive for the ‘*nix’ Category

ssh-keygen: password-less SSH login script (via Novell User Communities)

Posted by jpluimers on 2012/01/20

I usually get at least one step wrong when doing ssh-keygen and transferring they public key by hand, so here is a nice script that helps you install a private/public keypair for remote SSH login without having to type a remote password.

Note: it is always a good idea to have a local passphrase for protecting the private key.

–jeroen

ssh-keygen: password-less SSH login script | Novell User Communities.

Posted in *nix, Power User | Leave a Comment »

Javascript PC Emulator – Technical Notes

Posted by jpluimers on 2011/08/08

Fabrice Bellard wrote a brilliant piece of code: a PC x86 Emulator running in JavaScript.

It can run JSLinux inside your (FireFox 4.x, Chrome 11+, Opera 11.11 and Internet Explorer 9) browser :)

Some links: News, FAQ, Notes and JSLinux.

–jeroen

via: Javascript PC Emulator – Technical Notes.

Posted in *nix, Power User | Leave a Comment »

Synchronize your NTP time using pool.ntp.org: the internet cluster of ntp servers

Posted by jpluimers on 2011/07/15

If you use NTP for syncing your time, then choose pool.ntp.org as your time server:

The pool.ntp.org project is a big virtual cluster of timeservers providing reliable easy to use NTP service for millions of clients.

I use it for instance to synchronize the time on my ESXi servers.

Note: when you run Windows VMs as ESXi guests; let ESXi time-sync them through the VMware tools, and disable Windows’ own time syncing. I didn’t disable it, and my Windows VMs were consistently off by over 30 minutes.

–jeroen

via pool.ntp.org: the internet cluster of ntp servers.

Posted in *nix, ESXi4, Power User, VMware, Windows, Windows 7, Windows Vista, Windows XP | 2 Comments »

alias to have Unix list command ‘ls’ output numerical chmod permissions (via Stack Overflow)

Posted by jpluimers on 2011/04/25

Though I use Linux and Cygwin often, the discrepancy between permissions in chmod and ls still strikes me.

I mean: after all these years, does the *nix world still want newbies to learn the octal notation of file permissions and do the math themselves? Come on!

Bsaically, you can use the stat command to show the octal permissions next to the filename (so you can apply them with chmod), but sometimes it is handy to have both the chmod and ls versions next to each other.

For showing both, this awk script comes in handy.

I slightly modified it to use ls -al instead of ls -l, and condense it on one line:

ls -al|awk '{k=0;s=0;for(i=0;i<=8;i++){;k+=((substr($1,i+2,1)~/[rwxst]/)*2^(8-i));};j=4;for(i=4;i<=10;i+=3){;s+=((substr($1,i,1)~/[stST]/)*j);j/=2;};if(k){;printf("%0o%0o ",s,k);};print;}'

If you want to have it in your .bashrc or .bash_aliases, then you need to escape the double quotes and dollar signs:

alias "lsmod=ls -al|awk '{k=0;s=0;for(i=0;i<=8;i++){;k+=((substr(\$1,i+2,1)~/[rwxst]/)*2^(8-i));};j=4;for(i=4;i<=10;i+=3){;s+=((substr(\$1,i,1)~/[stST]/)*j);j/=2;};if(k){;printf(\"%0o%0o \",s,k);};print;}'"

It shows me a listing like this:
$ lsmod
0200 total 47
0755 drwxr-xr-x+ 1 jeroenp None 0 Apr 11 14:00 .
1777 drwxrwxrwt+ 1 jeroenp root 0 Apr 11 09:21 ..
0700 -rwx------ 1 jeroenp None 207 Apr 11 13:50 .bash_aliases
0600 -rw------- 1 jeroenp None 4869 Apr 11 14:00 .bash_history
0755 -rwxr-xr-x 1 jeroenp None 1103 Apr 11 09:08 .bash_profile
0755 -rwxr-xr-x 1 jeroenp None 5657 Apr 11 14:00 .bashrc
0755 -rwxr-xr-x 1 jeroenp None 5663 Apr 11 09:08 .bashrc~
0755 -rwxr-xr-x 1 jeroenp None 1461 Apr 11 09:08 .inputrc
0600 -rw------- 1 jeroenp None 564 Apr 11 14:00 .joe_state
0600 -rw------- 1 jeroenp None 99 Apr 11 13:58 .lesshst
0755 -rwxr-xr-x 1 jeroenp None 792 Apr 11 09:08 .profile
0700 drwx------+ 1 jeroenp None 0 Apr 11 13:07 .ssh
0755 drwxr-xr-x+ 1 jeroenp None 0 Apr 11 13:32 install

–jeroen

via: Can the Unix list command ‘ls’ output numerical chmod permissions? – Stack Overflow.

Posted in *nix, Cygwin, Power User | Leave a Comment »

NTFS-3G: NTFS driver for non-Windows stack (Linux, Mac, Android, etc)

Posted by jpluimers on 2011/02/25

After not having taken a look at NTFS for Linux for a while, I recently found out that NTFS-3G supports many platforms: Linux, Mac OS X, Android, etc.

Oh: and it supports Compressed Files too.

–jeroen

Posted in *nix, Power User | 2 Comments »

Increasing your Windows XP NTFS disk size under VMware Workstation 7

Posted by jpluimers on 2011/02/11

Searching how to increase your Windows XP NTFS partitions of Virtual Machines running under VMware Workstation 7 gets you a truckload of links trying to get you to do all sorts of  command-line like vmware-vdiskmanager and such.
That was indeed the case up till VMware Workstation 6.5, but from version 7 on, it has become much easier.
But the links with difficult steps keep appearing at the top of the search queries.

Hence this blog entry: increasing the NTFS partition size in a Windows VM is easy!

The increase is a two step process:

  1. In VMware Workstation,  increase the size of the physical disk
  2. Increase the NTFS partion on that physical disk

Step 1 has become much easier since VMware Workstation version 7, you can do it from within VMware Workstation now.
Dinesh describes this small process very well in his Expand Disk in VMware Workstation 7 blog postRead the rest of this entry »

Posted in *nix, Power User, VMware, Windows, Windows 7, Windows Vista, Windows XP | Leave a Comment »

Stack Overflow ebooks

Posted by jpluimers on 2011/02/10

Greg Hewgill published a bunch Stack Overflow ebooks and StackExchange stats.
His readme explains a bit more on the books.
The blog he maintains makes up for some nice reading too.
Be sure to read the blog entry on the ebooks.

–jeroen

via Stack Overflow ebooks.

Posted in *nix, .NET, ASP.NET, C#, C# 2.0, C# 3.0, C# 4.0, Database Development, Delphi, Delphi for PHP, Development, HTML, HTML5, Java, JavaScript, Pingback, Power User, RegEx, Scripting, SocialMedia, Software Development, SQL, SQL Server, Stackoverflow, XML/XSD | Leave a Comment »

Updating your Endian FireWall Community Edition appliance

Posted by jpluimers on 2010/11/08

When updating one of my Endian FireWall Community Edition VMs, I found out that one of my test VMs was still at version 2.2rc3.

Two important points: The update site (which you can use if you registered) tells you to follow 5 steps to keep your Endian Firewall Community up to date, but forgets to:

  1. point you to the Endian documentation on enabling SSH
  2. mention that one of the steps is conditional, and the condition is phrased “If your Endian Firewall Community is older than version 2.2“.
    Note that all the 2.2 rc versions are considered older than version 2.2, so in those cases, you also need to perform this:

Read the rest of this entry »

Posted in *nix, Endian, Power User | Leave a Comment »

Endian –  Register EFW Community: watch your email addresses

Posted by jpluimers on 2010/10/08

Endian is a nice *nix based open source firewall appliance which has a free Community Edition (which always is a virtual appliance) and paid (either virtual or physical) edition.

It does a lot of things, including spam filtering, http caching, proxying, VPN, DHCP, routing, et cetera.
Those things are done very well, in a reasonably small footprint:

Registering for their community edition is meant to enable the on-line update mechanism for it.
It is supposed to work like this:

  1. You enter your email address
  2. They dispatch a mail to you with a verification link
  3. Clicking the verification link confirms that email address, and flags it in their database as valid for Endian Community updates
  4. You enter the same email on your Endian appliance to get updates

But using that registration is hard: their registration mechanism has at least two flaws: Read the rest of this entry »

Posted in *nix, Endian, Power User | Leave a Comment »

Performed an VMware ESXi 4.0 to 4.1 Update: 5 minutes of work

Posted by jpluimers on 2010/10/06

Thanks to an excellent post by Peter Sebastian from Jargon Technology, it was a breeze to upgrade.

I did the upgrade using Using the vMA virtual appliance, the statements are these:

After bringing the ESXi 4.0 box into maintenance mode, I performed these steps on an SSH connection to the vMA virtual appliance: Read the rest of this entry »

Posted in *nix, ESXi4, Power User, VMware | Leave a Comment »

Moving my VMs from ESX 3.5 to ESXi 4.1

Posted by jpluimers on 2010/09/23

After doing quite a bit of research and testing, these are the steps I used to move my VMs from an ESX 3.5 box to an ESXi 4.1 box. Read the rest of this entry »

Posted in Endian, ESXi4, Power User, Veeam | Leave a Comment »

Flusing the DNS cache

Posted by jpluimers on 2010/09/10

DNS is the fundament for resolving names to IP-adreesses.
Without it, no internet browsing or other connections to the outside world.

Like a lot of communication optimizations, caching improves the speed of DNS too (All programming is an exercise in caching -Terje Mathisen).

Sometimes, bad or unwanted DNS entries end up in your cache.
Those prohibit some of the communication.

Luckily, How to Flush DNS explains this for 3 platforms: Windows, Mac OSX and Linux:

  • Windows:
    ipconfig /flushdns
  • Mac OSX:
    10.5 and up: dscacheutil -flushcache
    pre 10.5: lookupd -flushcache
  • Linux:
    /etc/init.d/nscd restart

–jeroen – now happy he flushed an unwanted DNS entry from the cache

via: How to Flush DNS – Top Bits

Posted in *nix, Power User | Leave a Comment »

Control the VMware VMs from the commandline: vmrun – the successor of vmware-cmd

Posted by jpluimers on 2010/05/19

In the process of upgrading from VMware server 1.0 to 2.0, I found out that vmware-cmd.bat has been replaced by vmrun.exe.

The command-line options are different, and this link explains the vmrun command-line options in detail (well, much better than the vmrun.exe built-in help). The official documentation is available as a PDF.

One of the changes I had to make was from: Read the rest of this entry »

Posted in *nix, Power User, VMware | 2 Comments »

TeamViewer beta for Linux is available

Posted by jpluimers on 2010/04/29

The TeamViewer team announced they have a beta version available for Linux.
The current beta is version v5.0.8252, so it has newer version 5 features.

There are installers for:

  • Red Hat, Fedora, Suse, Mandriva (32/64-Bit)
  • Debian, Ubuntu (32-Bit)
  • Debian, Ubuntu (64-Bit)

And there is a generic .tar.gz file.

You can find them their Linux download page.

With the new beta, they now cover Windows, Mac OS, Linux and the iPhone.
Very convenient indeed!

–jeroen

Posted in *nix, Power User | Leave a Comment »

*nix – Mastering the VI editor

Posted by jpluimers on 2010/04/13

Every once in a while I need to do some text editing in a *nix environment that has a minimum toolset installed.

Which means: use VI.

VI is a versatile text editor from the early *nix days, but it is not straight forward to use.
Since I don’t use VI often enough, I tend to forget some of the commands.

Time to share my favourite VI link: Mastering the VI editor.
The link points to the basic stuff, but the page contains most of what you ever want to know about VI.

–jeroen

PS:
If possible, I install the JOE text editor on systems where I am admin.
JOE uses WordStar like key bindings, and supports UTF-8. Talking about “something old, something new” :-)

Posted in *nix, CommandLine, Development, Encoding, Power User, Software Development, Unicode, UTF-8, UTF8 | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 384 other followers