tag:blogger.com,1999:blog-31065717307659892512024-02-07T21:52:32.731-05:00Bruno BronoskyAn occasional outlet for my thoughts on life, technology, motorcycles, backpacking, kayaking, skydiving...Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.comBlogger70125tag:blogger.com,1999:blog-3106571730765989251.post-27630436072286162612015-02-27T16:22:00.000-05:002015-02-27T16:22:55.234-05:00Make your .profile or .bashrc idempotent.If you are like me, you have about a dozen lines in your .profile the prefixes directories onto your $PATH environment variable. Have you ever noticed how nasty your $PATH variable gets after a few sub shells or re-sourcing your .profile after and edit? I just added an alias and then did...<br />
<blockquote class="tr_bq">
. ~/.profile</blockquote>
...and boy things where ugly in the $PATH. So, how do you make things idempotent (able to be called mutliple times without side effects)? Well, your first modification to $PATH is probably something like:<br />
<blockquote class="tr_bq">
export PATH=~/bin:$PATH</blockquote>
Then you probably have a bunch of others like:<br />
<blockquote class="tr_bq">
export PATH=/usr/local/heroku/bin:$PATH<br />
export PATH=$ANDROID_HOME/tools:$PATH<br />
export PATH=$ANDROID_HOME/platform-tools:$PATH</blockquote>
Just change that first one to this:<br />
<blockquote class="tr_bq">
[[ -z "$PATH_ORIGINAL" ]] && export PATH_ORIGINAL=$PATH<br />
export PATH=~/bin:$PATH_ORIGINAL</blockquote>
That means you create $PATH_ORIGINAL once and only once. Then you use it as the starting point for all your path appendages later.<br />
<br />
Try doing this before and after the change and see what you get... You may be shocked by the before.<br />
<blockquote class="tr_bq">
echo $PATH<br />
for i in $(seq 10); do source .profile; done<br />
echo $PATH</blockquote>
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-5005850785082012712014-08-13T09:29:00.001-04:002015-02-13T12:41:38.846-05:00Seed your browser's autocomplete with important infoWhat do you do when you get that confirmation number after booking an airline ticket? Do you write it on a Post-It note? Lot of good that will do you when you are rushing to the airport. Do you just ignore it and trust that you got everything in an email? If your email is like mine, you may have a hard time finding it when you need it.<br />
<br />
What you can do is copy the confirmation number "80085" and then navigate to the airline's website <i>then add**</i> the confirmation number as a query string http://www.delta.com/?confirmation_number=80085 Make sure that the query string is still there. Bookmark it and give it a helpful name like "<span style="font-family: monospace; white-space: pre-wrap;">Delta Flight</span>" instead of the default "<span style="font-family: monospace; white-space: pre-wrap;">Delta Air Lines - </span><span style="font-family: monospace; white-space: pre-wrap;">Airline Tickets and Flights to Worldwide Destinations</span>". Then, if you use an awesome browser like Google Chrome, your bookmarks will be synced across all of your devices. That way if you bookmarked this on your computer, when you type in "<span style="font-family: monospace; white-space: pre-wrap;">delta</span>" on your phone you get...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjQHJe4VxjIyIYdvg-gVV3YtPFTdPfXrQGcBtxL6jIuWNIU47JNc3EFq4tpuxW3V3z8dj5LohpNRGSMliaAP9FncLLVx1AOScoA_2IOwQLn6JQ-4zlhMEahht7zIc-jIXpkiyT7ckNY8UP/s1600/delta.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjQHJe4VxjIyIYdvg-gVV3YtPFTdPfXrQGcBtxL6jIuWNIU47JNc3EFq4tpuxW3V3z8dj5LohpNRGSMliaAP9FncLLVx1AOScoA_2IOwQLn6JQ-4zlhMEahht7zIc-jIXpkiyT7ckNY8UP/s1600/delta.png" height="166" width="320" /></a></div>
<br />
Use the arrow on the right side to move the address to the address box rather than navigating straight there. Then you can select and copy just the confirmation number and have it ready to paste into the "Online Check In" form.<br />
<br />
This is useful for lots of things. I use it for anything that I know I'm going to want to remember when I'm in a browser. I use Evernote, but not for this. I don't need the extra steps of going to the website on my phone, launch Evernote, find the note, copy the confirmation number, switch back to the browser, then paste.<br />
<br />
<i>**then add</i> - I say this because sometimes the address you type. For example delta.com, gets redirected to a different address, like www.delta.com, and the query string may get lost. This is not the case with Delta, but it may be with others.Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-60153173616592635402014-02-27T16:11:00.000-05:002014-02-27T16:15:10.152-05:00Linux Oneliners<span style="font-family: Courier New, Courier, monospace;">I am moving entries of my old one-liners text file to a web page for easier access.</span><br />
<pre lang="bash"><span style="font-family: Courier New, Courier, monospace;"># mount cdrom
[ -d "/mnt/cdrom" ] || mkdir -p /mnt/cdrom; mount /dev/cdrom /mnt/cdrom/
# mount a samba/cifs share (hostess is used by vmware in NAT mode)
user=rbronosky; [ -d "/mnt/smb" ] || mkdir -p /mnt/smb; mount -t cifs //hostess/$user -o username=$user /mnt/smb
# remove the leading path from a find
find . | sed 's/^..//'
# basic bash for-looping
for f in $(cat changed_files.txt) ;do vimdiff trunk/$f branches/iteration3/$f; done;
# if you have spaces in filenames
find . -type f |sed 's/^..//'|while read f; do ls "$f"; done
# or
(IFS=$'\n';for f in $(find . -type f) ; do cat ../Logs2/$f $f>../LogsCat/$f; done;)
# version number comparison using the power of the Python standard lib
[ "1" == "$(python -c "from distutils.version import *;print int(LooseVersion('3')>=LooseVersion('2.5.1'))")" ] \
&& echo Yes || echo No
# above is True, below is False...
[ "1" == "$(python -c "from distutils.version import *;print int(LooseVersion('2.3')>=LooseVersion('2.5.1'))")" ] \
&& echo Yes || echo No
# basic anonymous cvs
cvs -z3 -d:pserver:anonymous@iterm.cvs.sourceforge.net:/cvsroot/iterm ls
# make wget use filenames as suggested by the HTTP header Content-Disposition (requires wget>=1.11)
# http://www.vim.org/scripts/download_script.php?src_id=6328 becomes ps_color.vim
echo -e '\ncontent-disposition=on'>>~/.wgetrc
# copy files using ONLY ssh, not scp or sftp
tar cvf - $files_and_dirs_to_send | gzip | ssh $destination_server "cd $destination_dir; tar zxvf -"
# or to leave them compressed on the remote side...
tar cvf - $files_and_dirs_to_send | gzip | ssh $destination_server "cat > $destination_dir\archive.tar.gz"
### Help dad out via ssh (and telephone) ###
## I configure my router to forward $secret_port to port 22 on my machine.
## Because Ubuntu does not default to having and ssh server, I tell dad to do:
sudo apt-get install openssh-server
## I to tell dad to connect to my computer via:
ssh -p $secret_port -R $secret_port:localhost:22 -N $my_username@$my_router_ip & screen; kill %1
## I connect to his computer via:
ssh -v -p $secret_port $dad_username@localhost screen -x
## Now we are both looking at the same shell. We can both type and collaborate.
## Convert/get a date from a timestamp using only Gnu Date
date -d @1199163600
## Sync the date of one server to that of another. (Useful when firewalls prevent you from using NTP.)
sudo date -s "$(ssh user@server.com "date -u")"
## Get 255 random chars from /dev/random
uuencode -m - < /dev/random |sed 1d|tr -d \\n|head -c 255
# That is Base64 [/+a-zA-Z0-9], but you can add a substirution to the sed.
# This one limits it to hex chars:
uuencode -m - < /dev/random |sed '1d;s/[^0-9A-F]//g'|tr -d \\n|head -c 255
# However, for storing into a DB, I like to keep the newlines so:
uuencode -m - < /dev/random |sed 1d|head -c 255
# Time stamp for a file name
date +%s
# a readable one
date +%Y%m%d%H%M%S</span></pre>
<pre lang="bash"></pre>
<pre lang="bash"><span style="font-family: Courier New, Courier, monospace;"># Get ip addresses for all network interfaces</span></pre>
<pre lang="bash"><span style="font-family: Courier New, Courier, monospace;">ifconfig | awk -e '/^[a-z]+/{sub(":",""); f=$1} /inet /{print f " " $2}'</span></pre>
<span style="font-family: Courier New, Courier, monospace;"><br />
# DiG format as a clean single line for batch processing</span><br />
<span style="font-family: Courier New, Courier, monospace;">dig +nocmd kudzu.ajc.com +noall +answer</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com1tag:blogger.com,1999:blog-3106571730765989251.post-28827709314159768082012-10-04T11:22:00.000-04:002012-10-04T11:22:38.669-04:00Apple could have scored a homerun with their connector changes<span style="background-color: rgba(255, 255, 255, 0.45098); color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">What I can't understand is why, in the same year Apple changed both it's iPhone connector and it's mag safe connector and yet it didn't consolidate their profile. They could have created a single connector that would allow:</span><br />
<a name='more'></a><br />
<div style="background-color: rgba(255, 255, 255, 0.45098); box-sizing: border-box; color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">
* iPhones/iPads to connect magnetically</div>
<div style="background-color: rgba(255, 255, 255, 0.45098); box-sizing: border-box; color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">
* iPhones/iPads to charge directly on MacBook Pro/Air power supplies</div>
<div style="background-color: rgba(255, 255, 255, 0.45098); box-sizing: border-box; color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">
* A new market for MacBook Pro/Air & iPhones/iPads hybrid peripherals</div>
<div style="background-color: rgba(255, 255, 255, 0.45098); box-sizing: border-box; color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">
* A optional upgrade[1] to the MacBook Pro/Air power supplies that would incorporate port replication to solve the LONG standing complaint of no docking stations for Macs.</div>
<div style="background-color: rgba(255, 255, 255, 0.45098); box-sizing: border-box; color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">
<br style="box-sizing: border-box;" /></div>
<div style="background-color: rgba(255, 255, 255, 0.45098); box-sizing: border-box; color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">
I really think Apple made a huge mistake here. This could have been a brilliant power play that would have left the analysts thrilled. Instead everyone is wondering if Apple can recover.</div>
<div style="background-color: rgba(255, 255, 255, 0.45098); box-sizing: border-box; color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">
<br style="box-sizing: border-box;" /></div>
<div style="background-color: rgba(255, 255, 255, 0.45098); box-sizing: border-box; color: rgba(0, 0, 0, 0.8); font-family: 'Helvetica Neue', helvetica, arial, sans-serif; font-size: 14px; line-height: 19px;">
[1] Everyone I know buys a 2nd power supply for their potable Macs. If there were an option to buy a [let's just set a price of] $200 power supply for your portable Mac that added an ethernet port, a display port, a Thunderbolt port and a few USB ports to the brick of the power supply... Would you buy it? Everyone I know would buy 2.</div>
Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com1tag:blogger.com,1999:blog-3106571730765989251.post-53678084955028180462011-12-14T01:05:00.000-05:002011-12-14T01:05:39.774-05:00Why I'm done with facebook and you should be tooI promised to do a complete writeup on this and I'm running out of time. Let's start with an outline.
<br />
<ol>
<li>Involuntarily posting to facebook when you view an "article" or web page.</li>
<li>Requiring me to install an "app" to view one of these "articles" that someone else [involuntarily] shared.</li>
<li>External sites requiring me to install their facebook "app" to <b>post</b> comments on their site.</li>
<li>External sites requiring me to install their facebook "app" to <b>view</b> comments on their site.</li>
<li>facebook is making a move to be the only social service you use.</li>
<ol>
<li>facebook is not great at everything.</li>
<li>We ought to be able to reward facebook with our loyalty for the services where they have earned it.</li>
<li>We ought to be able to reward flickr with our loyalty for the service where they excel.</li>
</ol>
<li>facebook is making a move to use your friends as enforcers of their homogeneous vision.</li>
<ol>
<li>If your friend choses facebook, you must also chose facebook.</li>
<li>If your friend is satisfied with the interface and the policies of facebook, they should be able to choose to use facebook to publish their content and consume yours.</li>
<li>If you prefer the interface of another service, you should be able to choose to use that service to publish your content and consume your friend's.</li>
</ol>
<li>Their are hundreds of ways to consume RSS/Atom feeds.</li>
<ol>
<li>If RSS were just being invented today by facebook, you would only be able to consume it with facebook.</li>
</ol>
<li>Tim Berners-Lee had a vision for an open web.</li>
<ol>
<li>I owe my life to this vision.</li>
<li>facebook is the antithesis of this vision.</li>
</ol>
<li>If the open web hadn't been a success; If facebook had come along instead; If AOL had won instead of falling; I would be stuck in the coal mining country of Appalachia with no industry.</li>
</ol>
These are a few of the points I'd like to cover. This is just a collection of thoughts. I wanted to get them down while they are fresh. The writeup will come. I have until January 1st, when I delete my facebook account. (Not sure how that is going to work yet. I want my facebook friends to read the article when it is complete.)Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com4tag:blogger.com,1999:blog-3106571730765989251.post-39808515774517068602011-03-09T23:20:00.003-05:002014-02-27T16:06:59.018-05:00git OnelinersThis started out as a <a href="http://twitter.com/RichardBronosky/status/5787185530">tweet</a> but quickly became a collection of one-liners. Some of this may be able to be accomplished with switches to regular git commands, but I can write awk faster than I can read a man page. Sad but true.<br />
<br />
<pre lang="bash">
# add files to the index which `git status` lists as untracked:
git add $(git status | awk 'p==1{print $2}; /git add /{p=1}')
# remove files from the index which `git status` lists as deleted:
git rm $(git status | awk '$2=="deleted:" && p==1{print $3}; /git add\/rm /{p=1}')
# add files to the index which `git status` lists as ``Changed but not updated``/modified:
git add $(git st | awk '$2=="modified:" && 'p==1{print $3}; /git add /{p=1}')
# checkout the penultimate commit (used for stepping backwards through commit to find the introduction of a bug)
git checkout $(git log | awk '/^commit /{if(i++>0){print $2; exit}}')
# That was my first day git user approach. Now I know to use
git checkout HEAD~1
# Yes, I know about HEAD^, but because HEAD^2, HEAD^3, etc. don't work I chose tilde notation.
# create a quick git repo with 50 commits for trying out git hackery
d=/tmp/git_hack; rm -rf $d; git init $d; cd $d; for i in {1..50}; do git log | md5 >test.txt; git add .; git commit -m "commit $i"; done >/dev/null
# rebase 1 commit out of a branch
read -p "hash? " hash; git rebase --onto $hash~1 $hash HEAD; files=$(git st -s | sed '/^UU/!d;s/^UU //'); [[ -n $files ]] && (git co --theirs $files; git add $files; git rebase --continue)</pre>
Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-60265487715873655952010-12-19T02:00:00.004-05:002014-02-27T16:07:08.697-05:00Android OnelinersThe next time I have to setup a non-Eclipse (aka: VIM) Android development environment, I'm going to want to remember these commands.<br />
<br />
<pre lang="bash">
# android PATH
export PATH=$PATH:/Applications/Android/sdk/android-sdk-mac_86/platform-tools:/Applications/Android/sdk/android-sdk-mac_86/tools
# complete the SDK install (adb and all other platform-tools will be missing without this)
android update sdk
# create an Android Virtual Device
android create avd -c 256M -t $(android list | awk '$1=="id:"{l=$2} END{print l}') -n latest
# start the emulator
emulator -avd Captivate2.1u1 -no-boot-anim -scale 0.65 -show-kernel
# or
emulator -avd latest -no-boot-anim
# kill the adb server (for when the adb server was started before your emulator was launched)
adb kill-server
# add sdk.dir to ant settings
sed -i.bak '/^sdk\.dir=/d' local.properties; echo "sdk.dir=$(which adb | sed 's|/[^/]*/[^/]*$||')" >> local.properties
# compile in debug mode
ant debug
# install a package in the emulator replacing the existing install
adb -e install -r bin/HelloWorld-debug.apk </pre>
Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-14164028976246823062010-06-01T00:39:00.003-04:002010-06-01T00:56:38.610-04:00Playhouse in progress, part 3I'm really excited to have finally found a reason to learn Google Sketchup. I've recreated a 3D version my plans, which I created in Adobe Illustrator (2D PDF in an earlier post). I took some <a href="http://j.mp/9hc83e">still shots</a> and exported an animation to <a href="http://vimeo.com/12193957">video</a>.<br /><br />Yesterday I graded the land and set the foundation stones. Today I moved all of the pre-constructed floor, porch, and walls outside to the foundation and assembled it all. I still need to put plywood on the walls, and have not even begun to do the roof.<br /><object width="640" height="424"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12193957&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00adef&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=12193957&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00adef&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="424"></embed></object><p><a href="http://vimeo.com/12193957">Playhouse Animation</a> from <a href="http://vimeo.com/bronosky">Richard Bronosky</a> on <a href="http://vimeo.com">Vimeo</a>.</p>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-36733587381256681432010-05-26T01:27:00.002-04:002010-05-26T01:42:59.899-04:00Playhouse in progress, part 2I bought the <a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=180470540757">windows for the playhouse</a> today. I finally <a href="http://www.flickr.com/photos/richardbronosky/4640645543/in/set-72157624138629992/">uploaded some photos</a> to Flickr. They are a bit underwhelming so far. I haven't been able to start on the 3 walls that contain windows because I didn't know where I could buy them. I can finally move on with my plans.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm5.static.flickr.com/4012/4640645543_1375225ee9.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 500px; height: 333px;" src="http://farm5.static.flickr.com/4012/4640645543_1375225ee9.jpg" border="0" alt="" /></a>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-16082048459139848022010-05-17T00:53:00.003-04:002010-05-17T01:25:11.072-04:00Playhouse in progressI decided to make the girls a playhouse that would take up 8ft x 8ft in the back yard. Most of the plans I found online were for a 8ft x 4ft, only 4ft tall (excluding the pitched roof) with a 2ft porch. I really appreciate the insight I got from those plans but I think 4ft on the inside is just too small, my 3 yr old is 41 inches tall already, and 2ft for a porch doesn't even give you room for a chair. So, I decided to make it 5ft x 8ft and 5ft tall with a 3ft porch. I realize that at some point we won't want this thing in the backyard anymore and an 8x8 structure can't be moved without a CDL (trucker's license). For this reason I have decided to make the covered front porch detachable. I accomplish this with separate foundations for the house and porch and a 2 piece over-under roof system. <a href="https://docs.google.com/fileview?id=0B_Vzf9NTUo1EZWY1MzYxODQtYzcxOS00NmFkLWJlODItYWZjNzUxODhjYTll&hl=en">Here are the plans.</a><br /><br />So far I have framed both floors and the back wall. Today I bought and cut the composite decking for the porch and picked out the 4 windows. Now that I have settled on 18in x 27in windows, I can make the front and side walls.Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com2tag:blogger.com,1999:blog-3106571730765989251.post-19165447693395924212010-04-03T12:45:00.005-04:002010-04-04T00:14:40.692-04:00Hosting your own Blog is stupid!I've hosted my own blog for 15 years. For me it has been about "freedom". The new "freedom" is being free to not have to deal with the hassle.<br /><br />I started in 1994 with plain HTML. A year later I added JavaScript, ColdFusion, and MSSQL server when I started working professionally. In late 1998, I got into Macromedia Flash. At that point I broke from expressing myself verbally ("blogging") and was more interested in artistic expression. (This would be a short lived diversion.) In 1999 I started coding in PHP and learned about Free Software.<br /><br />By the end of 2000 I had solid experience with RedHat 6 & 7 and considered my self an "expert". (In reality I know nothing but bash and GNU utils.) Near the end of 2000, my company hired Jerry Tubbs who brought with him a Beta of Mac OS X which I installed on my company issued G3 PowerBook "Lombard". (I clearly remember how the blue Apple logo in the center of the menu bar made it feel like an iMac.) I found myself compiling Apache, PHP, and MySQL from source tarballs and being amazed that it worked "on a freaking Mac"! I hated Apple up until that point. I hated that my company forced me to use OS 9. I hated that anybody used any web browser other than Internet Explorer 5! I quickly upgraded to Mac OS 10.0 and then 10.1. At this point I would never own another MSFT windows computer.<br /><br />I would continue developing PHP for 10 years. I used custom PHP to template my own blog, then for content entry. I was very active in the Open Source community. I used a lot and contributed a lot of code snippets from/to places like http://www.phpclasses.org/ and numerous mailing lists and forums. I was very resistant to using Wordpress, but I eventually submitted to temptation in late 2004. Since then I have dealt with comment spam, plugins, a few exploit avoidance upgrades, backups, blah, blah, blah. I use http://flickr.com to host my photos. I use http://github.com to host my code. I use http://gmail.com for email with my own bronosky.com domain. I just can't justify hosting my own blog. I will continue to own bronosky.com and use it for email, FTP, and as a SOCKS proxy and SSH hop. I will continue to run a VPS at http://slicehost.com to keep up my sysadmin chops. However, I will not be hosting a blog there. For now I've chosen to use http://blogger.com and I am very pleased with my ability to use things like the http://cooliris.com Flash widget. I can now remove modPHP and optimise my Apache configuration for serving Django via WSGI and Worker MPM.Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-84890515032773322372009-04-23T22:54:00.000-04:002010-04-02T00:58:17.452-04:00How to create patches with diff or “svn diff” and apply them with patchNearly all of this information is available elsewhere on the internet. However, I am going to go about demonstrating it in ways that I wish others had. I am primarily concerned with recursively patching directories (patching a single file is very simple), so I ran into some problems which I didn't see anyone else address. Those unique solutions are the main reason I chose to create yet another diff/patch how to.<br/><br/>I like to create demonstrations that you (or I, 6 months from now when I forget all of this) can copy/paste on your own system to prove that it works. (The whole freaking thing, or line-by-line.) I learn best by doing, so I encourage you to "do" these proofs instead of trusting me.<br/><br/><blockquote>First exercise: Let us create our test environment.<br/><pre lang="bash"><br/>mkdir -p difftest/date<br/>date >> difftest/date/time.txt<br/>find difftest > difftest/files.txt<br/># Okay, no you have a project folder called difftest<br/><br/>cp -r difftest difftest_new<br/>date >> difftest_new/date/time.txt<br/>mkdir difftest_new/files<br/>mv difftest_new/files.txt difftest_new/files/list.txt<br/># Now we have made a few modifications to new revision called difftest_new<br/><br/># Lets not touch the original project folder. We will make a copy to hack on.<br/>cp -r difftest difftest-to-be-patched<br/><br/># The following command creates a patch<br/>diff -ruN difftest difftest_new > difftest-to-difftest_new.patch<br/># That is it. You have a patch file that you can share with anyone without embarrassment.<br/># Note: It is customary to create the patch from the parent folder of both the old and<br/># new folders. It is bad form to create the patch from either of those folders<br/># with ../path to get to the other.<br/><br/># A customary diff patch can be with -p1 which strips the first dir off the path<br/>patch -E -p1 -d difftest-to-be-patched < difftest-to-difftest_new.patch<br/># The -E is not important here, but it is needed for patches created by svn. I suggest you<br/># always use it.<br/><br/># The following command will tell you 2 directories are identical. You just have to trust me.<br/># We will use this more later.<br/>diff -r difftest_new difftest-to-be-patched<br/># You want it to return nothing. (It is a diff command, not a same command.)<br/></pre></pre></blockquote><br/><br/>You need to lookup the means of the args given to the diff and patch commands in there man pages. I hate telling people to RTFM because most are so long you cannot find what you need. I am telling you what you need and asking you to learn why.<br/><br/>The mysterious argument is "N" on the diff command. The manual says, "Treat absent files as empty." Which meant nothing to me, but I learned that I need it. That is what causes the patch to handle the files you move/remove/rename in your revision. <strong>That's important and hard to troubleshoot.</strong><br/><br/><blockquote>Second exercise: Let's put our test into an svn repo and create the patch from there.<br/><pre lang="bash"><br/># These steps assume you have completed the steps above.<br/>svnadmin create repo<br/>svn mkdir file://$PWD/repo/tags -m 'initial setup'<br/>svn import -m "initial import" difftest file://$PWD/repo/trunk<br/># Now we have our original project in a new local repo<br/><br/>svn copy file://$PWD/repo/trunk file://$PWD/repo/tags/release1 -m "deployed $(date)"<br/># Now we have it tagged<br/><br/># We will make the same changes to trunk that we made in the first exercise.<br/>svn checkout file://$PWD/repo/trunk<br/>date >> trunk/date/time.txt<br/>mkdir trunk/files<br/>mv trunk/files.txt trunk/files/list.txt<br/>svn add trunk/files<br/>svn remove trunk/files.txt<br/>svn commit trunk -m "new"<br/># Changes are made and commited<br/><br/>svn copy file://$PWD/repo/trunk file://$PWD/repo/tags/release2 -m "deployed $(date)"<br/># Now we have this one tagged<br/><br/># Just to prove that you do not need to have a local copy of the code to do this...<br/>rm -rf trunk<br/><br/># You can create a patch that would bring release1 up to release2 like so...<br/>svn diff file://$PWD/repo/tags/release1 file://$PWD/repo/tags/release2 > release1-to-release2.patch<br/><br/># So, if your client has release1... created like so...<br/>svn export file://$PWD/repo/tags/release1<br/><br/># You can tell them to apply the patch like so...<br/>patch -d release1 -p0 -E < release1-to-release2.patch<br/><br/># I can prove it to you like so...<br/>svn export file://$PWD/repo/tags/release2<br/>diff -r release1 release2<br/># Again, you have to trust that diff works.<br/><br/># Finally, if you do not have tags to work with you can do a similar thing with revision numbers<br/>svn diff -r2:4 file://$PWD/repo/trunk > revision2-to-revision4.patch<br/># That patch is functionally identical to release1-to-release2.patch<br/># To discover which -r range to use, examine: svn log file://$PWD/repo/trunk<br/></pre></blockquote><br/><br/>The argument "-E" is important when applying patches created from svn. (There is a subtle difference between patches created with diff and svn diff.) If you leave off the -E you will notice that files you remove (and that includes the original of any file your rename or move) will still exist after applying the patch, but they will have a size of 0 bytes. <strong>This is a booger to trouble shoot</strong>, and none of the other "how tos" are going to help you much.<br/><br/>So, why would you do this? Why not just send the complete revision to your client, production server, etc. In many cases your projects code can be hundreds of Megabytes. These patches are usually small enough to email. Even if you only modified a single file, following the customary form will save the recipient from having to locate the file that needs to be replaced/patched.<br/><br/>If that doesn't convince you, check out <a href="http://www.codediesel.com/tools/transferring-psd-files-quickly/">Transferring large PSD files quickly using Diff-Patch</a>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com1tag:blogger.com,1999:blog-3106571730765989251.post-45748833783419954582008-12-05T20:43:00.002-05:002010-12-19T02:20:37.012-05:00RPM One-linersI prefer the apt package manager used by Debian based Linux distributions, but am forced to deal the Red Hat Enterprise Linux professionally. For that, I keep this list handy.<br/><pre lang="bash"><br/>###############<br/>## rpm tasks ##<br/>###############<br/><br/># Get a (sorted) list of install packages<br/>rpm -qa|sort|less<br/><br/># find out what version of samba-client is installed<br/>rpm -qa samba-client<br/><br/># Find out how a certain file got here<br/>rpm -q --whatprovides `locate libmysqlclient.so | sed '1p;d'`<br/># or<br/>rpm -q --whatprovides `which smbmount`<br/><br/># Extract files from an rpm<br/>mkdir tmp; cd tmp; rpm2cpio ../pkg.rpm | cpio -id <br/><br/># import a public key to resolve error like:<br/># Warning: ...rpm: 3 DSA signature: NOKEY, key ID 5072e1f5<br/>k=5072e1f5; gpg --recv-keys $k; gpg --export -a $k > /tmp/$k.asc; sudo rpm --import /tmp/$k.asc;<br/># and to verify and clean-up...<br/>rpm -qa | sort | grep pubkey; rm /tmp/$k.asc<br/><br/>##################################<br/>## yum based package management ##<br/>##################################<br/><br/># add Fedora epel repository to CentOS<br/>wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-2.noarch.rpm<br/>k=217521f6; gpg --recv-keys $k; gpg --export -a $k > /tmp/$k.asc; sudo rpm --import /tmp/$k.asc;<br/>sudo yum install epel-release-5-2.noarch.rpm<br/><br/># find out what versions of samba-client are are available<br/>yum search samba-client<br/><br/># install samba-client<br/>yum install samba-client<br/><br/># update an old version of samba-client<br/>yum update samba-client<br/><br/>######################################<br/>## up2date based package management ##<br/>######################################<br/><br/># Get help on using RPM repositories<br/>up2date|less<br/><br/># Get a list of all available packages<br/>up2date --showall > /tmp/up2date.all.txt<br/><br/># Install the package perl-DBD-MySQL from the repository<br/>up2date -i perl-DBD-MySQL<br/></pre>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-34669303237725442042008-12-05T20:41:00.002-05:002010-12-19T02:20:46.526-05:00Mysql One-linersThings I'm tired of googling for...<br/><br/><pre lang="mysql"><br/># pragmatic access to system variables<br/># 1. There are 2 types of system variables GLOBAL and SESSION<br/># 2. LOCAL is a synonym for SESSION<br/># 3. SELECT requires "@@[type].[var_name]" syntax, so you might as well use it for SET also.<br/>SELECT @@global.thread_cache_size;<br/>SET @@global.thread_cache_size=16;<br/><br/># Investigating the tables on your DB instance<br/>SELECT table_schema, table_name, engine FROM information_schema.tables WHERE engine != 'MyIsam';<br/><br/># Change password<br/>SET PASSWORD [FOR user] = PASSWORD('some password string')<br/>SET PASSWORD [FOR user] = 'ExistingPasswordHashProbablyFromAnotherServer'<br/><br/># empty all the tables in a schema (from BASH using my MYsql alias which includes the U & P)<br/>schema=elections; MYsql -hdev1 -B -N -e "select concat('delete from ',table_name,';') from information_schema.tables where table_schema='$schema';" | MYsql -hdev1 $schema<br/></pre>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-38281792187421447572008-11-20T07:12:00.000-05:002010-04-02T00:58:17.457-04:00Command line tool for dpasteThere are lots of snippet hosts sites that are good for sharing in chats. I like dpaste because its interface is simple and effective even if it doesn't have an official API. <a href="http://dpaste.com/hold/92000/">I wrote this tool</a> to help use it from the command line. Here is an easy way for you to get it:<br/><pre lang="bash"><br/>cd ~/bin #assuming you have a personal bin folder in your $PATH<br/>curl -o dpaste http://dpaste.com/92000/plain/<br/>chmod +s dpaste<br/></pre><br/>If you look at the title for that dpaste "paste" you'll see an example of how to use it:<br/><img src="http://img.skitch.com/20081120-g59at8jexc28ne2ey1efi59fts.jpg" alt="dpaste command line tool example title" /><br/>There are a lot of really cool things happening there.<br/><ul><br/> <li>The tool published itself</li><br/> <li>It used my OS username</li><br/> <li>It captured the entire command line for the title</li><br/> <li>The command included a Unix pipe</li><br/> <li>The command included process substitution</li><br/></ul><br/><br/>And to top it all off I landed a really cool, rounded paste number (92000).<br/><br/>Just in case that paste disappears I will also place a copy of the code here:<br/><pre lang="bash"><br/># In order for the default title to capture the complete command, a shebang (#!) must not be used<br/>usage(){<br/>cat < < EOF<br/>dpaste - a command line tool for posting to dpaste.com<br/>Usage: <br/> dpaste [-h] [-l language] [-t title|-u] [-p poster|-a] [file]<br/><br/>Summary:<br/> dpaste accepts a stdin pipe and posts the content to http://dpaste.com<br/> with the command (complete with pipes) as the title and your username as<br/> the name. If you pass a file it will be sent instead of stdin and the<br/> filename will be used as the title. The following flags are available:<br/> -h<br/> -H Hold until nobody has looked at it for 180 days.<br/> -l language<br/> Specify: Python|PythonConsole|Sql|DjangoTemplate|JScript|<br/> Css|Xml|Diff|Ruby|Rhtml|Haskell|Apache|Bash<br/> -t title<br/> Override the default title.<br/> -u Paste untitled.<br/> -p poster<br/> Override the default Name/Email.<br/> -a Paste anonymously.<br/> -- Denote the end of flags. Needed if filename starts with a "-".<br/><br/>Acknowledgments:<br/> Copyright (c) 2008 Richard Bronosky<br/> Offered under the terms of the MIT License.<br/> http://www.opensource.org/licenses/mit-license.php<br/> Created while employed by Atlanta Journal-Constitution<br/>EOF<br/>}<br/><br/>title=$(history|tail -n1|tr "\t" "#"|sed "s/[^#]*#//")<br/>poster=$(id -un);<br/><br/>while [[ $1 == -* ]]; do<br/> case "$1" in<br/> -h|--help|-\?) usage; exit 0;;<br/> -H) hold="-F hold=on"; shift;;<br/> -l) language=$2; shift 2;;<br/> -t) title=$2; shift 2;;<br/> -u) unset title; shift;;<br/> -p) poster=$2; shift 2;;<br/> -a) unset poster; shift;;<br/> --) shift; break;;<br/> esac<br/>done<br/><br/>if [[ -n "$1" ]]; then<br/> content=$1<br/> title=$1<br/>else<br/> content=/dev/stdin<br/>fi<br/><br/>url=$(curl -s -L -o /dev/null -w "%{url_effective}" \<br/> -F "content=<$content" \<br/> -F "language=$language" \<br/> -F "title=$title" \<br/> -F "poster=$poster" \<br/> $hold http://dpaste.com<br/>)<br/><br/># copy the url to the clipboard if you are using a Mac<br/>$(which pbcopy > /dev/null 2>1) && echo -n "$url" | pbcopy<br/>echo "$url"<br/><br/># vim:ft=sh:tw=78<br/></pre>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-39471985281674596322008-11-20T06:31:00.000-05:002010-04-02T00:58:17.459-04:00More “Basic Economics”I saw someone make the following statement on a technology forum discussing expensive Solid State Drive storage: "Why not save that thousand bucks or two so we can help prevent another economic disaster like the one we currently got ourselves into?"<br/><br/>This demonstrates how poorly the average person understands our basic economic fabric. It does not give me encouragement about our future.<br/><br/>A strong economy relies on the exchange of liquid assets. Economic downturns can almost always be attributed to the spending of money that is [merely] speculated to exist in the future.<br/><br/>In non-academic English: Going into debt almost always kills an economy (eventually). (Whether that be the economy of a nation, state, county, city, business, church, or family, it still holds true.) When you go into debt you spend tomorrow's money. When tomorrow gets here*, you are in trouble. This problem is resolved when people spend money they have. That "spending" can be on groceries or fancy restaurants, netbooks or expensive SSDs, charitable donations or investments/savings (which get invested). The only thing you can do with money that is bad for an economy is take it out of circulation. (aka: "Save" it under your mattress.)<br/><br/>Huh? But what about debt? Aren't I contradicting myself? No. Debt is not money. Debt is like anti-money. The collision of money and anti-money is similar to that of matter and anti-matter. Tomorrow finally got here*, and this is what it looks like. Go spend some money. Just do it responsibly. For some that means buying 256GB SSDs. For me that means having $0 debt and socking money into low to moderate risk investments to be prepared for layoffs, retirement, and kids going to college (in that order).<br/><br/>Do not think that luxury items or those who purchase them are evil. That's politics. We have to be smarter than that.Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-16613904931233750802008-11-17T10:04:00.000-05:002010-04-02T00:58:17.460-04:00book meme<blockquote>Obsolete constructs.</blockquote><br/><a href="http://oreilly.com/catalog/9780596009304/">Linux in a Nutshell, 5th Edition</a><br/><br/><br/><br/>Book meme:<br/><br/>- Grab the nearest book.<br/>- Open it to page 56.<br/>- Find the fifth sentence.<br/>- Post the text of the sentence in your journal along with these instructions.<br/>- Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.<br/><br/>via:<br/>- <a href="http://leahculver.com/2008/11/13/book-meme/">http://leahculver.com/2008/11/13/book-meme/</a><br/>- <a href="http://www.eflorenzano.com/blog/post/book-meme/">http://www.eflorenzano.com/blog/post/book-meme/</a><br/>- <a href="http://justinlilly.com/blog/2008/nov/12/book-memery/">http://justinlilly.com/blog/2008/nov/12/book-memery/</a><br/>- <a href="http://jtauber.com/blog/2008/11/12/book_meme/">http://jtauber.com/blog/2008/11/12/book_meme/</a>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-447243341563977222008-11-05T08:46:00.000-05:002010-04-02T00:58:17.461-04:00Entire nation enjoys beautiful weather as God celebrates the election
of his spawn<em>This is an <a href="http://theonion.com">onion</a>-style article that I thought up.</em><br/><br/>In an unprecedented meteorological anomaly the entire continental United States of America unanimously enjoyed beautiful weather on November 5th. They say "you can't please everyone," but that is exactly what Yahweh pulled off for this post election celebration. The descended man-child President Elect and his surroundings enjoyed a moderate 72 degrees which is, not so coincidentally, the exact temperature that Barack sets the thermostat to in his home. In Georgia they got that "warm in the sun, but cool when the breeze whips" weather that they love. "I know they could use some rain, but let's face it, they can't drive in the stuff", remarked the Lord, "I just didn't feel like killing anyone with stupid traffic accidents." The ski resorts in the Mid-West got the snow they'd been praying for, in an amazing show of Grace upon the red states who did little to embrace the inevitable. "It's not like I couldn't target the snow just on Colorado, right?", he joked, "I'm just not like that anymore, and I haven't been for thousands of years." America has taken to the streets to enjoy this amazing gift from God. Both gifts actually. "I gave Noah a really cool rainbow, but those are pretty gay by today's standards", remarked the deity. He declined to comment on why Alaska was omitted in this gesture of good fortune. Asked about the abortion issue, God said he was "tired of single-issue politics", explained that you could be pro-life and pro-Obama, and then pretended that he was getting an important call.Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-23487248043235986242008-10-01T10:01:00.000-04:002010-04-02T00:58:17.463-04:00My question for BarackI just posted <a href="http://moderator.appspot.com/#e%253Dagltb2RlcmF0b3JyDQsSBlNlcmllcxjvAQw%252Bt%253Dagltb2RlcmF0b3JyEAsSCERvcnlVc2VyGMLKAQw%252Bv%253D11">my first debate question</a> on Google's Moderator app.<br/><br/><blockquote>For Barack Obama:<br/>There's a lot of concern about your ties to Marxism. For many, your potential as a black role model outweighs those concerns. Can you assure us that you will drive a message of "you can do anything", instead of "you need the government to help you"?</blockquote><br/><br/>I don't find much that I agree with in either candidate. So, I feel that out of this election the best potential for good is the effect that Barack could have on black youth. But, if his message is the typical, socialist, "the world is so unfair that you cannot do anything for yourself without my help" then I think he could actually do more harm than good.Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-1429809091490662902008-08-22T20:57:00.000-04:002010-04-02T00:58:17.464-04:00Time to stop recommending Netscape! (Revisted)I've <a href="http://bronosky.com/?p=55">done this before</a> but it seems that things are only getting marginally better. Here is my latest communication with Bank of America...<br/><br/><blockquote><br/>Even though you claim to support Firefox here: <a href="https://onlineeast3.bankofamerica.com/cgi-bin/ias/YpM7nB321ecfIGtkpf6kJTrNlR2sJbviuAJCxUO6359545/2/WelcomeControl?annNumber=0&action=announcement#Ann0">https://onlineeast3.bankofamerica.com/cgi-bin/ias/YpM7nB321ecfIGtkpf6kJTrNlR2sJbviuAJCxUO6359545/2/WelcomeControl?annNumber=0&action=announcement#Ann0</a><br/><br/>I find that you are still making yourself dangerously liable for recommending 3 browsers for Macintosh users, all of which are not being maintained with security patches... here: <a href="http://www.bankofamerica.com/creditcards/index.cfm?template=photoexp_notsupported">http://www.bankofamerica.com/creditcards/index.cfm?template=photoexp_notsupported</a><br/><br/>Please be aware that I publish articles about these things and I include copies of the form letters you reply with, so I would suggest you put some thought into your response.<br/></blockquote>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-69228591782215829062008-06-11T05:52:00.000-04:002010-04-02T00:58:17.465-04:00cron safe bash script for checking URLs (pages) for updatesI needed to monitor a government data source for updates. Of course being a government institution, they haven't caught on to the RSS/ATOM concept so the normal tools for this will not work. (There really should be a "Google Alert" option for this.) This is the simple bash script I whipped up to serve the purpose.<br/><pre lang="bash"><br/>#!/usr/bin/env bash<br/># pagecheck.sh - intended to be call via crontab (call with -v for verbose) ##<br/><br/># If you want to override the standard temp dir, define it here.<br/>export TMPDIR=$HOME/tmp<br/><br/># List the pages you wish to check below, one per line, between the EOFs<br/>pages=`cat < < EOF<br/>http://www.gadoe.org/pea_communications.aspx?ViewMode=0 <br/>http://www.gadoe.org/pea_communications.aspx?ViewMode=1&obj=1635<br/>EOF<br/>`<br/>for page in $pages; do<br/> hash=$(echo "$page"|md5sum |sed 's/[^a-z0-9]//gi')<br/> basename=$(basename $0)<br/> name=$basename.cache.$hash<br/> file=$TMPDIR/$name<br/> diff=$TMPDIR/$basename.diff<br/> [[ "$1" = "-v" ]] && echo "Checking $page"<br/> if [[ ! -f "$file" ]]; then<br/> file=$(mktemp -t $name)<br/> echo "Creating cache $file ..."<br/> curl --stderr /dev/null "$page" > $file<br/> else<br/> [[ "$1" = "-v" ]] && echo "Checking against cache file $file ..."<br/> curl --stderr /dev/null "$page"| diff -u $file - > $diff || (echo -e "Found a change in $page\n"; cat $diff; echo "")<br/> patch $file $diff<br/> fi<br/>done<br/>[[ "$1" = "-v" ]] && echo "Done!"<br/><br/># vim:ft=sh<br/></pre><br/><br/>And to run this script every hour, I modify my crontab (via: "crontab -e") and make it look like so:<br/><pre lang="bash"><br/>MAILTO=me@mydomain.com<br/>#min hour day/m month day/w command<br/>0 */1 * * * /home/rbronosky/bin/pagecheck<br/><br/># vi:syntax=crontab:ts=8:tw=0 <br/></pre><br/><br/>Enjoy! I hope someone else finds this useful.Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com1tag:blogger.com,1999:blog-3106571730765989251.post-35307934870841453282008-05-13T19:07:00.000-04:002010-04-02T00:58:17.466-04:00A basic lesson in economics and politicsI posted this as a response to one of many frighteningly uneducated rants about gas prices. Let me be very clear in stating that I am <strong>extremely worried</strong> about energy costs and its effect on my family. (I have started car pooling 4 days a week and working from home 1 day which is the most my employer will grant.) What I am more worried about is what the dumb masses may do in response to the stress that we are all feeling.<br/><br/><br/><blockquote><br/><blockquote>Dan said: "...with all the extra cash being stolen from the consumer..."</blockquote><br/>Dan, That was a pretty ignorant thing to say. Please post a link to the definition of "stolen" that applies to this situation.<br/><br/>What you must realize is that gouging has nothing to do with profits, it has to do with profit margins.<br/><br/>Let's say your business makes and sells a simple product, like slotted o-rings. You make the product by purchasing non-slotted o-rings and turning them on a lathe. You have brokered a deal with you customers that allows you to have a 10% profit margin. However, a market event has caused the cost of your precursor to double. This means that you must invest twice as much of your capital in the non-slotted o-rings in order to meet your customers' volume demands, which have not changed. Even though you are not selling any more product, you are spending nearly* twice as much each month. (*assuming that you have employees whose wages have not changed) The redeeming factor is that your fixed profit margin of %10 means that your profit nearly* doubled along with the cost of the non-slotted o-rings. At first, your customers will be upset that the cost of your product has nearly* doubled, but when they see the figures they will understand that you are not stealing additional profit. That is, unless your customers are being enticed by politicians/media and your product is a ubiquitous commodity like gasoline.<br/><br/>If you where forced to sell your product at the old price, you would be losing nearly* 40% and would go out of business immediately. If you were forced to lower your profit margin to 5%, you (or your investors) would likely decide that your risk is not worth the reward and choose to invest your capital elsewhere. If your customers' politicians decided to buy votes by promising to levy steeper tax burdens on your "evil profits", you would have to choose to either increase your prices or take profits away from your investors to pay the taxes. If your investors include the pension/retirement investments of virtually every single policeman, fireman, teacher, and anyone else with a lick of sense in this country (as is the case with the oil companies), those taxes on "your profits" actually end up coming out of the very people that the politicians were manipulating in the first place.<br/><br/>These knee jerk solutions to our energy crisis are very dangerous. People like you are going to turn this economic correction/recession into a full blown depression if you get your way. And the socialist politicians will be laughing all the way to the treasury. They will then use the taxes you demanded they take [vicariously] away from you, and use them to implement social programs to provide for you what they feel are your basic needs. From each according to their ability to each according to their need. Of course those with friends in high places will be judged to have greater needs.<br/></blockquote><br/><br/>Here is an interesting link about <strong>profit <u>margins</u></strong>: <a href="http://www.gravmag.com/oil.html#dollar">http://www.gravmag.com/oil.html#dollar</a><br/><br/>Update: Here is a great article on the matter, that I found after I published this article. <a href="http://www.nationalreview.com/comment/taylor200511081818.asp">http://www.nationalreview.com/comment/taylor200511081818.asp</a>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com1tag:blogger.com,1999:blog-3106571730765989251.post-85280170902187567032008-05-01T06:02:00.000-04:002010-04-02T00:58:17.468-04:00Direct download links to Stuffit Expander!I hate the "you sign up for our newsletter and we will email you a link to the software that handles our proprietary format which nobody in their right mind should be using" business model of this company. I used to use dodgit.com or dodgeit.com for this, but they seem to be up and down a lot lately. Anyway, I figure if they are going to get access to my gmail address, I'm going to blog about it.<br/><br/>As the following link becomes out of date, feel free to add new links to the comments.<br/><br/><a href="http://my.smithmicro.com/downloads/trials/exp-dl-only.html">http://my.smithmicro.com/downloads/trials/exp-dl-only.html</a>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-22138891190445491622008-04-30T08:18:00.000-04:002010-04-02T00:58:17.469-04:00Bookmarklet for copying scriptures from BibleGateway.comIf you've ever tried to copy a scripture from http://biblegateway.com and found that the copyright notice and banner get copied too, this is for you. I have created a Bookmarklet (<a href="https://www.squarefree.com/bookmarklets/">more about those here</a>) that works on both Firefox and Safari (I don't use MSFT products so I don't know if it works in IE).<br/><br/>Drag this link to your bookmarks toolbar -> <a href='javascript:Array.prototype.forEach.apply(document.getElementsByTagName("div"),[function(el){if(el.className=="publisher-info-inset")el.parentNode.removeChild(el);}]);'>BibleGateway Copy Enabled</a><br/><br/><a href="http://userstyles.org/forum/comments.php?DiscussionID=546">Many thanks to this thread</a> for saving me a little time.Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0tag:blogger.com,1999:blog-3106571730765989251.post-10306662709711347922008-03-31T20:42:00.000-04:002010-04-02T00:58:17.470-04:00Time to stop recommending Netscape!I sent this message to Bank of America today. I think the message needs to get out to more organizations, so let's spread the word.<br/><br/><br/><blockquote><br/>You need to update <a href="http://www.bankofamerica.com/creditcards/index.cfm?template=cc_whatyouneed_ca">your list of supported browsers</a>.<br/><br/>There are several issues here.<br/><ol><br/> <li>Netscape is no longer made by anyone, <a href="http://blog.netscape.com/2007/12/28/end-of-support-for-netscape-web-browsers/">as stated in this announcement</a>. The most important statement there is "We'll continue to release security patches for the current version of the browser, Netscape Navigator until February 1, 2008", which means that on 2008/02/02 it became a liability to use or recommend the Netscape product. You, as a banking institution, should be concerned about giving advice (browser to use) that if followed could lead to account hijacking.</li><br/> <li>Microsoft no longer makes nor supports an Internet Explorer browser for Macintosh.</li><br/> <li>Apple no longer makes hardware capable of running OS 9.</li><br/></ol><br/><br/>You should be recommending Mozilla Firefox, as does Netscape/AOL, for non-Windows users of the Macintosh, Linux, Unix, and (Free/Open/Net)BSD varieties. Having such outdated information on your website makes you appear to be "behind the curve" on technology and does not garner confidence in future customers. That is a real shame considering that I, as a computer engineer in the internet industry, am very impressed with the display of technology found with Bank of America. The statement made outside your site does not reflect the excellent user experience that is to be found inside.<br/></blockquote><br/><br/><a href="http://bronosky.com/pub/boa_browsers.png">Screenshot</a>Anonymoushttp://www.blogger.com/profile/07558528821697820938noreply@blogger.com0