techno magic

warning: Creating default object from empty value in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/modules/taxonomy/ on line 33.
Leeland's picture

The Little Known Label Option For diff

I love it when I run over a simple solution to what seemed like a difficult (or at least convoluted) problem. Today I needed to generate some patch files to create a Crucible code review PRIOR to checking in the code. To do this is actually a little difficult by hand as the steps are:

  1. Take the shelved change list
  2. Unshelve the change list into some temporary perforce client: p4 unshelve –s 123456
  3. Create patch p4 diff –du100000 ./... >123456.patch (for files that contains less than 100000 lines it would be okay)
Leeland's picture

Shell Scripts That In-Line Java

Sometimes the simplest things get overlooked. There are many times where I need to do something a little cross system languages. For example dynamically deciding on the right arguments to feed to a Java tool or service JVM. Or when I need to do some undirected graph manipulations of data from PowerShell or bash. There is no reason to not step up to the higher level language to get the job done.

Leeland's picture

All of bash history revisited: load time solved plus directory history

Imagine logging into a box after a nice long three day weekend and asking yourself "self, what was I doing last Thursday?" or "what did I do on this server when I was here nearly a month ago?" What if you could answer that in such detail as what you did, where you were when you did it and you could get back there with only a few key strokes? Check this out (opening a new ssh session to my production box I haven't been on for weeks):
Using username "a-lartra".
Authenticating with public key "imported-openssh-key" from agent
Leeland's picture

All of bash history forever and across multiple sessions

The last terminal to exit wins the "who's history is saved" game. Unless you pull a cute Linux stunt or three.

Update: A better solution is now available All bash history revisited: Load time solved PLUS directory history

Leeland's picture

Autostart VMware Guest on login to Windows

After a couple days of open VMware, click box, click start, click next box, click start, click next box, click start, ...., ahhhhh!!! Today I got fed up with my "get to code" process.

Leeland's picture

Ubuntu Tidbits

== Table of Contents ==


== From Red Hat to Ubuntu ==

* Rosetta [ switching to Ubuntu from Red Hat Enterprise Linux, Fedora, and Centos]

== Disable Blank Console Screens ==

Leeland's picture


I grew up using vi. Never got into emacs. Then along came vim. I ignored it of course. Then suddenly vi was gone and vim was quietly mapped to vi. Oh well, had to learn sometime.

== .vimrc ==
Almost all of my vim magic is embodied in my ~/.vimrc file.

au FileType * set tabstop=4|set shiftwidth=4|set noexpandtab
au FileType python set tabstop=4|set shiftwidth=4|set softtabstop=4|set expandtab
au FileType make setlocal noexpandtab|set softtabstop=4

" Make backspace a tad more friendly
set backspace=indent,eol,start
Leeland's picture

Keeping SSH Sessions Alive NATs & Firewalls

Working often requires opening terminal sessions or VPN connections. It can be very annoying when these connections fail after being left idle for a few minutes, or with VPNs in the middle of a work day in spite of traffic. In regard to SSH connections many people (even many experts) incorrectly assume that the SSH server (sshd) has some restrictive session auto-timeout setting. If you look carefully at the manual for sshd configuration (man sshd_config) you will see that there is not even a setting to enable a session timeout behavior.

Leeland's picture

Locking Up Multiple Systems

At my office we have this thing called the "Dude Protocol." When I first started working here I thought it was a neat idea to make people a little more security conscience. The procedure is that if any workstation, laptop, or terminal is left logged in but without someone sitting there using it everyone is allowed (in fact directly ordered) to pull up the email client and send an email message to the "Fun" email list with the subject of "Dude" and then to LOCK the terminal.

Leeland's picture

Ancient Technology Lessons For Software Development

Many times a day I sit and wonder about why something is (or is not). (Sounds pretty Zen I know, however, it is still true.) Technology is evolving so fast as to seem out of control. Yet, there are still fundamental elements we should be following. One of these is usability.

Leeland's picture

Amazing Alternate Reality Shots

Is it from a game? Screen shot of an Inception concept story board or not?

Faux reality gallery of deceivingly realistic structures that are maze-like when observed too closely. Surprisingly, not a game nor CGI from Inception! Jean Francois Rauzier’s Hyperphotos are photographic reconstructions of real places often created from between 600-3,400 individual photos. A bit like Hockney, Jean photographs a single place for one to two hours. He uses a telephoto lens to collect close-up shots of his scene.

Leeland's picture

Microsoft's Cloud Computing platform.

I love the presentation style for this video on Microsoft's coming technology:

What is Windows Azure?

Leeland's picture

Subversion Tricks

== Rollback A Change ==
While working on an issue, I found the following stored in the subversion repository:

$ ls

In subversion (or any version control system really), it is not necessary to make a backup file when committing changes, as the change can be rolled back easily. To roll back in subversion, simply execute a reverse merge:

svn merge -c -1234

1234 is replaced with the commit number that you would like to reverse.

Leeland's picture

Recovering Lost Data From Page Firefox Cache

Big company, large IT department, huge wiki server used by all. Do they have a recent backup? If you count 6 months old as recent then sure. Of course for a project started since the last back up that put 100% of the documentation into the corporate wiki when the server breaks and they have to go back to the back-ups this sucks.

Now of course being a tech-head I have ultra paranoid cleanup settings on my cache, browse history and other things. But, managers and office types often don't care nearly as much.

Leeland's picture

SSH vs. nohup and hung jobs

Every 6 months or so I have some little loop I wrote to run a process on a long list of servers sit and hang forever by waiting for the nohup background process to end before moving on to the next host. Naturally I come back after getting lunch expecting all the boxes to be busily humming away to find 3 have finished and the 4th is still running. This of course causes me to remember that ssh hangs on processes even if they are pushed off to the background with a nohup.

Thread Slivers eBook at Amazon

Syndicate content