Job

Friday, November 28, 2008

Converting ^M

I keep running into files that have weird encoding for returns.  I suspect it is a combination of optimization and obfuscation.  I particularly see this with javascript files.

Here is the fix…
First, to get the ^M which is a control M, type ctrl v followed by ctrl m.
To get ^@ type ctrl v followed by ctrl shift 2 (or ctrl v followed by ).

Second, the conversion…

In vi (or vim) use the following:

:%s/^M/\n/g

or with perl on the command line:

$ perl -pi.bak -e ’s/^M/\n/g’

^M is ASCII 13 (Ctrl M), which is the carriage return.

Different operating systems use different symbols to set the end of a line/new line.
Unix uses newline (\n)
Mac uses carriage return (\r)
And Windows/DOS use both (\n\r)

The reason I put the ^@ one on there is because some times when I convert the ^M to \n, it becomes ^@ instead, which doesn’t help.  Well, in reality it does.  You just convert the ^@ back to ^M.  When you convert the ^@ back to ^M, then the code looks all pretty.

In vi (or vim) use the following:

:%s/^@/^M/g

or with perl on the command line:

$ perl -pi.bak -e ’s/^@/^M/g’

As with all things nerdy… your mileage may vary.

Posted by Moose on 11/28 at 01:58 PM
JobLinux and UnixPermalink
Comments:
Geurk on 12/04 at 10:38 AM said:

Being involved with web application development as well, I have to say, CTRL-M’s suck. smile

There is also a nice utility called dos2unix (and unix2dos) that can be installed via the Debian package ‘tofrodos’.

Another favorite Debian package of mine, if you use SecureCRT, is ‘lrzsz’.  It allows you to do zmodem (remember the old BBS days?) transfers directly through your SSH connection.  Just type ‘rz’ at the command line and SecureCRT will pop up a dialog box asking what file you want to upload.

-g


Moose on 12/04 at 11:58 AM said:

Geurk,

Thanks for the comment.  You are correct in that dos2unix is a great tool.  Between that tool and unix2dos and mac2unix you can convert all your \n\r’s to \n’s as needed.  However, there are times where this won’t work.  I ran in to one such time and, hence, my posting about doing it manually.

As with all things nerdy… your mileage may vary.

--Moose


Monday, November 17, 2008

Software as a Service - A response to Scatterbrain

Scatterbrain had a posting (http://klcollins.org/2008/11/17/software-as-a-service/) where he responded to an article on zdnet web site (http://blogs.zdnet.com/SAAS/?p=609&tag=nl.e539) about a company saving a considerable amount of money by switching from internal exchange servers to using Google mail.

I was going to just leave a comment on his site, but as I thought about it and started responding, it was enough that I thought I would put it here and share with both my readers. So, the “you“‘s in this response are to Scatterbrain… you are intelligent, you can figure it out.... wink

--- a response ---

I think you are glossing over MANY issues and questions that need to be addressed. However, to boil things down, I can EASILY see where moving your company’s mail to Google would be valuable, good, wise, and the right move. However, I would be speculating on a lot of things in making that argument. So, let’s stick with the article and the information it provides.

Your contention, based on the question, “who owns the data?”, is that if a company uses Google mail (or any other 3rd party service) then they cease to “own the data”. This is ludicrous. Ownership of the data never changes. However, what does (potentially) change is the network(s) that the data goes over and where it is stored.

The article stated that they had:

800 users
18 countries

They also stated that they were using Postini. Postini is a hosted message security and compliance product owned by Google. Hosted where? Google servers.

So, in their environment, ALL the data is already going to Google servers.
In their environment, ALL accounts are already set up on Google servers.

Your next argument was that once the data leaves your premises, It leaves your control and you have no idea how it is handled, who is handling it, and what’s being done with it.

Umm… this is the internet. That already happens.

You make a case for all the data being in your care where you can ensure that backups happen. It runs in your own colo facility. You control the process end-to-end.

Okay, so you use a colo facility. So, your data goes over a network that you do not control, where others have access, and you have no visibility. Thus, it is not internal. It is mostly internal, but not completely.

To bring this back around…

You state that interanl corporate collaboration data needs to stay internal.

My question to you is why?  Is the data such that if it got out it would substantially harm the business?  I would suspect that for MOST data the answer is no, it is not.  There is probably a few pieces that might fall into this category.  My response to that is then the wrong medium is being used.  Try the phone.  Oh, sorry, can’t do that based on your response - as you certainly do not control that public utility.  Try a fax… nope, again, public utility.  Oh, I know… try printing it out and hand couriering it.  Lawyers do that for sensitive stuff, so there is a precident.

--- end response ---

Posted by Moose on 11/17 at 03:41 PM
PersonalJobLinux and UnixCommunityBloggingPermalink
Comments:
ScatterBrain on 11/21 at 11:05 AM said:

I’ve responded to your response - here You should check it out.


Monday, September 29, 2008

Fifty-Nine and Thirty-Two

Those are the percentages of Democrats and Republicans in the House that voted “yes” for the Bailout bill. The bill failed with a vote of 205 yes and 228 no.

Democrats: 140 yes; 95 No (59.57% voted yes)
Republicans: 65 yes; 133 No (32.82% voted yes)

I am not a politician. I certainly am not an economist. I certainly do not understand the issues nor do I understand the ramifications of either the yes or no vote. However, I do know that the US is not a Socialist country. We are not France. We are not Russia. We are not China. We are a Democratic Republic - a Democracy.

Now, I don’t have a job. I am out of work, and burning cash. You might think that I would be blindly for such a bailout. You would be wrong. You would be wrong because of the last paragraph. I do not know the ramifications. One of the questions is, who do I trust? Who does KNOW what the ramifications are of either decision? I am guessing that the House of Representatives don’t know. I would think that they have researched it. I would think that they have economists giving them opinion. According to the news the President has economists giving him opinions.

So, were 140 democrats right or were 95 of them right? Were 65 Republicans right or were 133?

I really hate the news. They are good at giving the emotional side of things. They are good at pulling on heart-strings. And yet, the House has voted (according to the news - to the doom of our society) no on this issue. Heck, maybe they do know, and the President doesn’t. Perhaps the agendas are different - perhaps like most things political there is no right or wrong answer - there is just choosing one agenda over another. Each has consequences - both good and bad. As the news stated today - with any financial swing there are winners and there are losers. There are buyers and there are sellers. Wachovia just sold its banking operations to Citibank - creating the largest U.S. bank by total deposits. All for merely giving them $2.16 Billion in stock and assuming debt of $53 Billion. So, they paid, in essence, $55 Billion.

What do I know? Other than knowing we are not a Socialist country, I know that the Dow is ten thousand something. Okay, it has been between ten thousand and eleven thousand for a long time now - since June. It first crossed 2000 in 1985 - the year I graduated High School. It Crossed 4000 in 1994 - 9 years later. It crossed 6000 in 1996 - two years after crossing 4000. It crossed 8000 a year later in 1997. It crossed 10000 in 1999. It got up to above 11,000 to 11,722.98 on 1/14/2000 before starting a plunge to a low of 7,422.84 on 10/7/2002 - a 4300 point drop 22 months. Yeah, it was a good time to be trying to run a small business… mine failed, how about yours? But, after that it started climbing; hitting 14,087.55 on 10/1/2007. Not quite double in five years. And now, a year later, sitting at 10,365.45 - about the same drop amount as 2001/2002.

You know, it just hit me. While the dates and numbers are different, the trend of the DOW’s adj. close resembles another chart I’ve seen in recent history. Let’s compare…

DOW Historical - Hockey Stick ShapedGlobal Climate - Hockey Stick Shaped

Maybe, just maybe…

Could it be?

Could it be that Al Gore is making the Global Climate AND the DOW Historical average both look like hockey sticks? Does he have some diabolical scheme in mind? Is it really a correlation that we are really willing to admit exists??

I’ll leave that up to you, my two readers, to make the decision. For me, it is something else that I don’t know. I do know that it is scary. I do know that I would rather be contemplating this while employed than while un-employed. I do know that the economy is a big deal and that I know next to nothing about it.

Back to Wachovia and Citibank. What did Citibank get out of it? $700 Billion in assets. That number sounds familiar too… They got $700 Billion in assets for $55 Billion. Since those numbers are no where near equal, where is the rest of the risk? Oh, I know… they also get $312 Billion pool of loans that is expected to lose $42 Billion. Oh, and as part of a deal, the FDIC gets $12 Billion in preferred stock of Citigroup because it has to bear the rest of the risk - in other words, any losses over the $42 Billion get absorbed by the FDIC. So, it isn’t technically our tax dollars, as the FDIC is an independent agency of the federal government and receives no Congressional appropriations. According to their web site (http://www.fdic.gov) they have about $49 Billion insurance fund and (previous to this deal) insured more than $3 trillion of deposits.

Posted by Moose on 09/29 at 10:14 PM
PersonalMusingsPoliticsJobCommunityPermalink

Friday, July 18, 2008

Position being eliminated

Well, I received notification today that my position is being eliminated at the end of August.

Posted by Moose on 07/18 at 10:12 AM
PersonalJobNewsPermalink
Comments:
Matsu on 07/18 at 07:09 PM said:

Whoa! I am REALLY sorry to hear about your job.

What is your company doing with their IT services (the functions that you and your team have been providing)? Is it being outsourced?


Moose on 07/18 at 08:59 PM said:

Matsu,

Thanks.  Most are going to CBS College Sports.  Others are yet to be determined.


Thursday, May 22, 2008

Compression never ceases to amaze me

I have a bziped file…

168403791 something_log.bz2

That’s right as a bz file it is 168,403,791.  Divide that by 1024 and you get 164,456.824 K, divide it again, and you get 160.6 M.  So, I have a 160 Meg file.  Now, personally I think that a file that gets shrunk by 90% is freakin’ impressive.  So, for it to be freakin’ impressive the unzipped file would be 1600 Meg.  But, what if it compressed 95% - that would make the original twice as big so 3.2 Gb.  Now, that would just be peachy-keen-rockin’ cool!  Well, I would like to say it got that small, but I can’t.

It ended up
6,211,364,237 something_log

That would be 2.7% of the original size!

I did another file…
bz2 file is 42 meg
un bz’ed and it is 1.8Gig
2.27%

I have to come up with new words… I don’t know what is beyond peachy-keen-rockin’ cool! 

Posted by Moose on 05/22 at 03:34 PM
JobLinux and UnixPermalink
Page 2 of 10 pages  <  1 2 3 4 >  Last »
QUOTE OF THE DAY:
I find that the harder I work, the more luck I seem to have. - Thomas Jefferson
Things I want:
Apparently I am to list some things I want as I never tell anyone and when I do its in the form of "I just got", so here is a list

Roasted and ground
Dirac on quantum mechanics
von Neumann and Morgenstern on game theory
Wiener on cybernetics
Feynman on quantum electrodynamics
Einstein's collected papers (all volumes)
The Art of Computer Programming by Donald E. Knuth. (all volumes)
Oh, and to understand women.

Tools:
translate binary and stuff
What I'm watching:
movie image Little Miss Broadway
movie image The Hurt Locker

Please Visit:

Some of the Web sites I have worked on in my career:
CURRENT:
State of Indiana
PAST:
www.aaronsdreamweeknd.com
www.aaronssuperfan.com
www.acctriviachallenge.com
www.allteltriviachallenge.com
www.arizonaathletics.com
www.baltimorebayhawks.com
www.big12sports.com
www.boomshea.com
www.bostoncannons.com
www.bridgeportbarrage.com
www.cha-health.com
www.chahealthagents.com
www.championship.usyouthsoccer.org
www.CommerceLexington.com
www.crosssphere.com
www.eastwestcollege.com
www.ecupirates.com
www.experienceispa.com
www.finalfour.net
www.futurelab.com
www.getasidekick.com
www.ghsa.net
www.gomarquette.com
www.gwinnettdailyonline
www.gwinnettdailypost.com
www.hoopitup.com
www.horizonleague.org
www.hostcommunications.com
www.iHigh.com
www.ispaconference.com
www.jpsports.com
www.kentstatesports.com
www.lexsports.com
www.lfsports.com
www.lonestarconference.org
www.lonestarshowdown.net
www.longislandlizards.com
www.maacsports.com
www.mackbrown-texasfootball.com
www.madisonbankky.com
www.majorleaguelacrosse.com
www.millenniumfarms.com
www.mgoblue.com
www.mondaymorningmessages.com
www.mstateathletics.com
www.ncaabaseball.com
www.ncaachampionships.com
www.ncaafootball.com
www.ncaafootball.net
www.ncaaicehockey.com
www.ncaalacrosse.com
www.ncaasoccer.net
www.ncaasoftball.com
www.ncaatradeshow.com
www.ncaavolleyball.net
www.ncaawrestling.com
www.newjerseypride.com
www.newtoncitizen.com
www.ntaonline.com
www.orugoldeneagles.com
www.philadelphiabarrage.com
www.polkspearls.com
www.raycomsports.com
www.redroom.com
register.imgacademies.com
www.rochesterrattlers.com
www.rockdalecitizen
www.schoolcounts.com
www.seckids.com
www.secsports.com
www.secsports.org
www.soccer3v3.com
www.southernsportsawards.com
www.sportsmarketing.org
www.statefarmlonestarshowdown.com
www.takg.com
www.teammomusa.com
www.texasfootball.com
www.texassports.com
www.traveltheperfectfreedom.com
www.triplecrownmedia.com
www.troytrojans.com
www.ukathletics.com
www.uksportsmarketing.com
www.uksportsmarketing.org
www.uscowboytour.com
www.usmiles.com
www.usyouthsoccer.org
www.usysregion3.org
www.uterwincenter.com
www.utladyvols.com
www.utsports.com
www.vinerykentucky.com
www.webberathletics.com

 

 

 

 

 

 

 

 

 

 

 

 

RSS Feed