background preloader

Programming

Facebook Twitter

Automating ssh logins (without keys) with 'expect' You need to automate a task across many machines.

Automating ssh logins (without keys) with 'expect'

You know the user name and password, but for some reason, either by policy or otherwise, you are not allowed to use PKI, or Public Key Infrastructure. Well, not to give up hope just yet, because there is a nice little tool that is extremely powerful, yet not widely utilised. it's called 'expect'. Expect does just as you would, uh expect it to do. It will start a process that would normally have interaction, and then you can tell it what to expect in return. Maybe you have to answer a yes or no question or supply it with a name or password. Typically you could ssh to a remote server. Myself@home:~$ ssh myself@somewhere.else.com You would get this response: myself@somewhere.else.com's password: Ok, no problem.

. #! Spawn /usr/bin/ssh myself@[lindex $argv 0] Now we are not finished yet. Now if this was our first time connecting to the remote server, ssh may ask us if we want to trust the fingerprint of the remote server to be authentic. "*? -Dave "*? Printing Under Linux. Q: Where are the printer drivers for my Frobozz WinPrinter?

Printing Under Linux

A: These printers (also often known, rather misleadingly, as "GDI" printers) are not supported at all under Linux at this time This status is not likely to change at any point in the future. WinPrinters are only supported under Microsoft Windows, and even then commonly only for particular versions (typically 3.1x and '95). Do not assume that drivers exist for your favorite variant, particularly if that variant is Windows NT. Don't buy one regardless of platform. You may have to spend as much as $100 more for a "real" printer. Q: But Linux hackers are pretty studly and c00l d00dz.

A: There are two major problems that strongly discourage WinPrinter support. Be aware that WinPrinters are not a single sort of printer where there would be a single printer driver. WinPrinters assume a computer system architecture where the critical design point is the Windows "GDI" API. I have got a Seikosha GDI laser printer. Lpr test.lj The model: Unix - sed: How can I replace a newline (\n) R: catching an error and then branching logic. HOWTO: Native iPhone/iPad apps in JavaScript. More resources On top of the information below, I can recommend a few other resources: Building iPhone Apps with HTML, CSS, and JavaScript is the only book I found that covered everything.

HOWTO: Native iPhone/iPad apps in JavaScript

I highly recommend it if you're planning on doing serious app development in JavaScript. If you'd like to get into native app development, take a step back and learn Objective-C first. The best Objective-C book I've found is Cocoa and Objective-C: Up and Running. Making it full-screen Normally, if you press "+" in mobile Safari and then "Add to Home Screen," the icon it creates acts like a bookmark into Safari.

To get rid of the URL and button bars, just add a meta tag: This is what my log app looks like when launched from the home screen: Changing the phone status bar You can also change how the phone's status bar is displayed with a meta tag. The values for content are default, black and black-translucent. Preventing scaling Preventing elastic scrolling Creating a home screen icon Confused? Tips Hosting. RRDtool - About RRDtool. What RRDtool does RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data.

RRDtool - About RRDtool

RRDtool can be easily integrated in shell scripts, perl, python, ruby, lua or tcl applications. News For the lastest news regarding RRDtool, check the Announcements Mailinglist Archive. Or add our Google+ page to your circles. Download RRDtool is available for download from this site. Sponsorship and Appreciators You like RRDtool?