technology and zen of life

“I don't suffer from insanity, I enjoy every minute of it” - Edgar Allan Poe

Horizontal Scrolling for MySQL queries in Linux

Everyone who works with databases on a linux terminal faces this issue at some point in time — executing select * on a table with too many columns. And in linux since there is no horizontal scrolling, the output is wrapped and hence completely unusable.

You can use

--pager

property to get rid of that text wrap.

Option 1

mysql -u<username> -p --pager="less -S" <database>

 

Option 2

Install a program known as “most”

sudo apt-get install most

And use this to invoke your mysql client

mysql -u<username> -p --pager="most" <database>

 

most is easier to use then less -S and the shortcuts makes it a breeze to run through all the data.

Note – Look the the bottom of the screen while running most to see Options or just read the man page.

If you any other option for viewing data on a terminal let us know!

A simple Timer for Windows

A while ago, I needed a simple desktop Timer application. I didn’t like any of all the existing ones, so I wrote my own. It’s called EvertTimer.

screenshot EvertTimer A simple Timer for Windows

screenshot of EvertTimer

I programmed it using C# with .Net version 4, so you need that to run this simple desktop application. Furthermore, you need the portable, single executable file EvertTimer.exe. If you are interested, you can download the source code.

Calendaring: Exchange can publish to ICS, defaults to insecure

ICS (iCal) is a file format for calendars. Most calendaring software uses it. For example, you can import / export it to Google Calendar. If you have a Google Calendar, you can “publish” your calendar to an ICS file, so you can use it with other software like Mozilla Calendar or web services.

Microsoft Exchange 2010 can also publish calendars to ICS. Which is great, because Exchange and Outlook offer more advanced features for heavyweight calendar users. Like using rich text and images for your descriptions, and adding file attachments. Steve Goodman has written a fine manual on how to enable iCal Calendar Sharing with Exchange 2010 SP1 (recommended reading).

Here I will not give the depressing account of my troubles installing Windows 2008 and Exchange. If you are used to installing Linux servers, prepare a few days instead of a few hours. Even after you have installed everything, after numerous reboots and fixes, buggy graphical config tools and a not-so-grown-up command line, you still have work to do. Like minding security.

If you publish your calendar to ICS, then you will receive an URL which is [1] plain HTTP, while it should default to HTTPS, and [2] not protected by a password.

The first problem can be solved by your firewall – do not allow normal http (80) traffic to your Exchange server. Instruct your users about the ICS URL; they have to replace http by https.

The second problem requires you to start the ISS Manager. Go to the owa/Calendar folder. Disallow the Anonymous access, and allow the Digest access. See the screenshot below.

Exchange 2010 ICS security Calendaring: Exchange can publish to ICS, defaults to insecure

Installing transmission and dnsmasq on a NAS

Introduction

In our student’s  dorm, we want to share files. We also have one shared internet connection using ADSL. The download speed is OK, but the uplink is weak. Many students like to use torrents, which quickly drain the uplink and the connection table of the modemrouter. So I set up a server with a torrent client, which was accessible by a web interface. I now replaces this server by a Iomega StorCenter Ix2-200 Coud Edition Network Attached Storage (NAS) device, which I will refer to as ix-2.

The default torrent client on the ix-2 is bad beyond imagination, so I wanted to install transmission-daemon.

Assumptions

  • The readers has moderate Linux command-line experience.
  • The reader is able to edit text files using vi.
  • The reader has good computer knowledge.
  • Your NAS device has a fixed / static IP address. Read the rest of this entry »

Mounting VMware disks on the host system

VMware uses virtual disk files as a source to store data from their virtual machines. These files are have an extension of .vmdk and are stored on your local hard drive. There are multiple instances where one would want to access these files without having to boot up the virtual machine. It could be due to a crashed VMware to recover files or like in my case to save time and speed up data retrieval from the VMware.

Luckily VMware has developed a tool for exactly these reasons, the VMware disk mount utility. You can download this utility from the following link for Windows http://www.vmware.com/download/eula/diskmount_ws_v55.html for Linux it normally comes as a part of the VMware workstation.

Read the rest of this entry »

Reverse-engineering the cascode

(from – http://analogcircuits.posterous.com/reverse-engineering-the-cascode)

Cascode (shown in Fig. 1) is well known and widely used circuit for creating large-impedances in integrated circuits. Cascode circuits also provide another advantage i.e. isolation between input and output ports and thereby reducing the Miller-effect and as a result cascodes have a good frequency performance. And when impedances achieved from cascode circuits are not good enough, we go on to use active-cascodes or regulated-cascodes. Even though cascodes are affected by the limitations of headroom (voltage swing), there are work-arounds for this problem that have been figured out by circuit designers (the smart engineers again). The question that I want to discuss here is – how did someone (must be a genius) think of this circuit which provides an elegant area-efficient solution for achieving large impedances consequently large voltage gains?


regulated and regular Reverse engineering the cascode

Fig 1. a) NMOS cascode sink b) regulated NMOS cascode sink.

Read the rest of this entry »

Using the presenter view in Microsoft PowerPoint.

I am sure that everyone has given presentations on a beamer / screen and will have to do so in the future. Most people I have seen presenting use the default slide show view in which the laptop/computer shows the same view as the projector / screen. This is quite unhandy when you want to refer to your slide notes or want to have an idea of the time you took till now or simply want to switch to a different slide by jumping a few in between without letting your audience being obvious of that fact.

ZA001058072 300x277 Using the presenter view in Microsoft PowerPoint.Here is where the presenter view functionality comes in use. It has to be one of the handiest tools while giving a presentation. The presenter view allows the user to take full advantage of the dual screens. While showing the full screen presentation on the screen the laptop/computer screen shows an organized collection of slide notes, navigation controls, drawing tools, timer, slide view shown on the projector and other powerful features.

 

 

 

 

 

Read the rest of this entry »

Why do we perform small signal analysis?

Why do we perform small signal analysis, when we are analyzing or designing analog circuits? This is a fundamental question that I think, is not discussed rigorously enough in the classes or text books on analog circuit design. I will attempt to qualitatively address this question here in this blogpost.

Untitled Why do we perform small signal analysis?

Fig. 1 a) Small-signal MOSFET model and b) small-signal bipolar model

Read the rest of this entry »

Email Subscription

Disclaimer

The views expressed on this blog are personal. We do not claim to be a representative voice of the views of any organisation whatsoever. We are not responsible for the content present on the blogs to which we have linked.Views expressed are solely that of the author and does not reflect a collective opinion of contributors.