-
25 NovTip of the Day - Part 2 - cd x to y
-
- cd x to y
-
I added an alias to my bashrc (cshrc) file:
alias cdxy 'echo `pwd` | sed "s|/\!:1\(/\?\)|/\!:2\1|g" > ${_DIRFILE}xy; cd "`cat ${_DIRFILE}xy`"'Now I can be in a folder and change a parent folder using the cdxy alias.
- 0 Comments
-
19 NovTip of the Day - Part 1 - vi/vim tic-tic
-
- vi/vim tic-tic
-
Open a file in vi/vim and move around like you normally would. Then do a find:
/div<CR>No you can return to your original location by hitting tic-tic (single quote twice):''This works when going home "gg" or going to the end "G" too!
- 0 Comments
-
31 OctElvis and his Pimp!
-
Elvis and his Pimp
Check out their Halloween costumes:

- Casey
- 0 Comments
-
04 OctBoxer Puppies
-

- 3 Comments
-
18 AugBella Knows Sit
-
Bella knows sit

After a few 'bites' and a few pets, Bella knows to sit first and ask questions second.
She sleeping most of the time. She just grabbed the car keys and put them on her side. Know she's trying to type on the iPhone. Now she's hungry.
Gotta go!
- Casey
- 125 Comments
-
18 AugDjango Admin Copy Button
-
Django Admin Copy Button
Using javascript I created a copy button to extend the change_form.html pages. Here is the code. Comment if you need more details.
1 {% extends "admin/change_form.html" %} 2 {% block extrahead %} 3 <script type="text/javascript"> 4 window.onload = function() { 5 6 // already an add page 7 var docLoc = document.location.href; 8 if( docLoc.indexOf('/add/')+5 == docLoc.length ) 9 return; 10 11 // add button 12 var domOrig = document.getElementsByName( '_continue' ); 13 var domAdd = document.getElementsByName( '_addanother' ); 14 15 // should only be one 16 if( !domOrig || !domOrig[0] ) return; 17 domOrig = domOrig[0]; 18 19 if( !domAdd || !domAdd[0] ) return; 20 domAdd = domAdd[0]; 21 22 // copy the continue button 23 var domClone = document.createElement( 'input' ); 24 domClone.type = domOrig.type; 25 domClone.size = domOrig.size; 26 domClone.name = domOrig.name; 27 domClone.className = domOrig.className; 28 domClone.value = 'Copy and continue editing'; 29 30 // insert before add button 31 domOrig.parentNode.insertBefore(domClone,domAdd); 32 33 // on click event 34 domClone.onclick = function() { 35 // location, form, action 36 var docLoc = document.location.href; 37 var domForm = document.forms[0] 38 var strAction = docLoc.substring( 0, docLoc.lastIndexOf('/',docLoc.length-2) ) + '/add/'; 39 40 // copy button ~ add button and will fail on unique-ness-es 41 // unless uniques are modified on page 42 domForm.action = strAction; 43 domForm.submit(); 44 return( true ); 45 } 46 } 47 </script> 48 {% endblock %}
- 86 Comments
-
04 AugPresley Photo Shoot
-
Presley Photo Shoot
Presley has a great photo and stays on another week!
Go Boxers!

- 0 Comments
-
04 AugDrive Through
-
Drive Through
This was similar to me parking in the Columbia Tower last week

- 0 Comments
-
03 MayBubba and Bella
-
Bubba and Bella

Bubba's playing dead and Bella's wondering "WTF are you doing?"
They are such good dogs. Yesterday the neighbor's grand-kids were climbing the trees in the back yard. Bubba just barked at him like he was a raccoon! Bubba never left the yard, even though they were calling him. Good boy Bubba!
There's a new reality show about dogs and there's a boxer named Presley that is a twin of Bubba.
Here's a photo of Presely:

- 1 Comment
-
02 Julvim Batch File
-
Vim Batch File
This is my vim.bat file. I use this to launch vim from any place (sendto, about:config->view_source.editor.path, etc). This is very handy!
1 @echo off 2 FOR /F "TOKENS=*" %%A IN ('C:\cygwin\bin\cygpath.exe -m "%~f1"') DO SET FN=%%A 3 4 C: 5 chdir C:\cygwin\bin 6 7 bash --login -i -c "rxvt -g 142x54+150+20 -sr -sl 2000 -title \" caseman@screamR [%~f1]\" -e vim \"+set nowrap\" \"+set lbr\" \"%FN%\" %2" 8 9
- 0 Comments