rblog

Firmware upgraded on our Samsung le46c635

Got some problems with our Samsung LCD-tv right now, depending on the daily mood of the tv it either shows a clear and bright picture, or it “flimmer”. Quite annoying, have nailed it down to be caused by the tv itself, and not by the digital decoder or the LG media center. Anyhow, to try to get rid of it I decided to upgrade the firmware. Turned out to be quite easy, spent most of the time trying to find out where to download latest firmware from. At last found it on the bottom of the Samsung.com webpage, “How can we help you?” –> “Download …”.

Then needed a Windows computer, since the file is a *.exe-file. Extract the content to a USB-stick, plug it in to the TV and choose SW-update from the menu, voila, in 2-3 minutes it is up and running again.

Did it fix the problem? No. Did I notice anything different after upgrading the firmware? No. Was it cool? Yes!

Removing Windows newline in bash scripts

Had an issue with the ‘^M’ characther in some files causing unwanted line breaks. Got some help from colleagues pointing out that it is a Windows line break. But – how to remove it in my bash script? Easy to do using TR told me, but no. Added

tmp="$(echo ${mLine} | tr -d '^M')"

but no luck…after some struggle it turned out that I could not just write ^M, I had to add it to the script using CTRL + V, then immediately followed by CTRL+V. Using VI as the editor that was what I needed to do to add the newline character to my script.

Create a blog post in Confluence using Groovy

Needed a way to publish a file containing a list of application versions installed in our WebSphere environment. What better to use than Groovy and XML-RPC for Atlassian Confluence. Tested on version 3.5


import groovy.net.xmlrpc.*

// ************** Set according to your environment ********
def SERVER = "http://<YOUR_SERVER_NAME>/rpc/xmlrpc"
def UID = "<UID>"
def PWD = "<PWD>"
def SPACEKEY = "<SPACEKEY>"
def BLOGTITLE = "<BLOGTITLE>"
def CONTENTTXT = "<TEXT WITH MACROS AND SUCH>"
// *******************************************************

println "Connect to server"
def c = new XMLRPCServerProxy(SERVER)

println "Login to server"
def token = c.confluence1.login(UID,PWD)

// Example found at http://confluence.atlassian.com/display/DISC/XML-RPC+Page+Updater+Example
println "Create blog and then save it"
def newBlogdata = [space:SPACEKEY,title:BLOGTITLE,content:CONTENTTXT]
c.confluence1.storeBlogEntry(token, newBlogdata)

// Clean up by logging out
println "Logout"
c.confluence1.logout(token)

Update:
In additon you would off course need to download the needed jar file, get it at http://groovy.codehaus.org/XMLRPC

My code is open source

Ages ago I created my own project in Java that enables me to export my entire blog (or parts of it) to PDF. Not very useful for my personal blog off course, but for the two blogs I have created for my kids it is my master plan to sometime have a book created. Who knows, in 50 years if they are able to view the content of the B2Evolution blog, but paper will for sure last that long.

My project is hosted by Google Code, http://code.google.com/p/b2evolution-to-pdf/ – free for everyone to use with the limitations that the third party libraries have.

Main purpose of publishing it to Google Code is to have a backup of the code, not just store it on my Lenovo T60 laptop which is…7 years old now? Second, it might be that someone out there might have the same need as me, and maybe my effort could save them time.

Snow Leopard – Trash can won’t empty

For some reason that the “Secure empty trash”-function refuses to tell me, it would not totally empty my trash on our Macbook Pro running Snow Leopard 10.6.8. I stumbled across this Youtube-clip that got me started http://www.youtube.com/watch?v=lPTY8kHd0Hw [video:youtube:lPTY8kHd0Hw]
Point is that you need to go to the terminal and do a

cd ./.Trash
sudo rm -rf *.*

to get the files deleted. If you watch the video don’t worry about all the warnings of how dangerous the command is and also the thing he says that the command can have change – it won’t change, this is a basic Linux/Unix command. Anyhow, this helped me out and I got to empty the trash totally. I guess it is a feature, but I hate the fact that it cannot empty my trash without me using command line sudo rm…