Showing posts with label tipsntricks. Show all posts
Showing posts with label tipsntricks. Show all posts

Jun 4, 2010

JqS5 Slide show and bookmarklet.

I just loved JQS5 (jQuery Simple Standards based Slide Show System) for the simple beauty that it is. If you just have a bunch of points to put across, and you are fast at html, you can throw together a slideshow in about 2 minutes.

Start writing a normal html file, put the main title in <h1> tag, your name in <i> follow it by a bunch of lists of points, each headed by an <h2>, load it in the browser and you are ready to hit full screen.

"Oh wait .. dont you have to add the css and js" ?

Oh yeah!, or you could just let these 2 bookmarklets to do that for you .. drag these bookmarklets to your bookmarks toolbar:

Load JQS5

and

show

"Load JQS5" inserts the the js and css .. Dont worry if not much happens, the js is not "activated" - only loaded. Click the "show" button. and let it do the rest for you.

These bookmarks load the js and css from the JQS5 website itself, which I discourage on 2 counts.
  1. We are using JQS5 website's bandwidth
  2. It will be faster to load it from the local machine.

Feb 8, 2010

Inkjet Printer hacks

Hacks are fun. Hacks are also usefull. Wierdly, I suddently stumbled upon 3 hacks back to back that use inkjet printers. So I started to list those that I find. If you know more, please leave a comment


Direct to cd printer used for printing cirquits
http://hackaday.com/2009/09/02/direct-to-pcb-inkjet-printing/


Inkjet printer used to "print" several different medical tests on paper based, postage stamp sized, "lab" (watch the whole vid, its included somewhere)
http://www.ted.com/talks/download/video/8556/talk/760

Inkjet printer used to "print" out a set of living heart muscles. (watch the whole vid, its included somewhere)
http://www.ted.com/talks/anthony_atala_growing_organs_engineering_tissue.html

Inkjet printer used to "print" out other organs like kidney, bladder etc.
http://www.ted.com/talks/anthony_atala_printing_a_human_kidney.html

Oct 15, 2009

GIMP : 2 Layer Dialogs trick

1) Locate the Dialog's special menu
2) Add a second "layers" menu. (not this is not possible from the Image's "Window>Dockable Dialogs" menu).
3) Drag resulting layer dialog tab outside.

4) Disable Auto Image switch for the dock.
5) Now use the two dialogs like you would use a split pane window manager.

Tip: You can use the scroll wheel to quickly switch images using the image selector at the top of the dock window.

Jul 13, 2009

Elinks, the best browser for text consoles

[ This was an old email ( though still valid) that I had sent to the internal mailing list at the previous company I worked for. I used elinks in xterm, so you can skip xterm related stuff if you use it on plain text console]

I have started using "elinks" for most tasks.. It is much better than
I thought. Only a few defaults are amiss. I just feel the following
tips will make you like elinks.


Tips in using "elinks":
Note, I use it in xterm.
1: First, make yourself familiar with settings up options
manager. To get the Options manager, first press Esc on
the keyboard, or the top row of the terminal using mouse.
In the resulting menu, Go to options manager.

The points that follow start with the option to
change. When changing the following settings, make sure you
read the accomponying text.

2: Document->Cache->Ignore cache-control info from server
Set it to: 0
Description: Cache-control header item is usually set by CGIs
to hint that the content must not be cached. When it is
ignored, it ends up as a huge nuisance.

3: Document->Default color settings->Use document-specified
colors
Set it to: 2
Dont worry, in a short while we will be disabling
transparency. :-)

4: Document->HTML Rendering->Underline Links
Set it to: 1
Well, Experiement. I liked with Underlines. Though it can get
nasty in webmail.

5: Document->Browser->Forms->
External editor
Set it to: your favorite editor.
When focus is in a text area, and it is in edit mode, press
F4 to open the content in text editor.

6: Under "User interface", play as you like. I liked the
following:
i. Clock
ii. LEDs

7: Terminals->xterm->colors
Set it to: 2
Actually, the correct way would be to set TERM environment
variable before starting elinks .. But I dont want to bother
myself with that, as I dont think my X is gonna get set to
monochrome all of a sudden.

If you don't like the document specified color for a
particular website, you can always cycle through color
choosing algorithms using %. It will become second nature
sooner than you imagine.

8: Terminals->xterm->Transparency
Set it to: 0


Other than these tips, remember, the mouse works just like in firefox
for so many things.
1. Left click to open
2. Right click links to get more options
3. Right click inside document to get yet more options
4. Middle click a link to open in new tab.
5. Middle click a tab to close the tab.
6. Scroll wheel works for vertical scrolling.
7. Scroll on the tabs bar to switch tabs.

Tips for using forms:
1. Press enter on a form's entry field before typing anything
into it. You can see the the mode in the status bar.
2. Press enter again to submit the form. Again, the status bar.
3. Press dot (.) to enable link numbering .. when this mode is
on, you can type a number to go to that link. Even the form
elements are treated as elinks, so you can jump between form
elements quickly using this.

Other tips :
1. To follow elinks, press enter or press right arrow key.
2. To go back, press the left arrow.
3. To go "forward" or "unhistory" as elinks calls it, press "u"
downlaod any link target using "d"
4. Press '/' to search stuff on the page
5. Use [ and ] to scroll horizontally. Too much text off the
screen? Use 'W' to switch wrapping.
6. Use '<' and '>' to switch between tabs.
7. Press t to open new tab. c to close, Ctrl-r to refresh.
8. Press g for location dialog.
9. Type a number before a shortcut key to repeat that key so
many times. Usefull for jumping 3 steps back in history.
10. Press "h" for history manager
11. Press '\' to see source
12. Press '=' to see info about the current object loaded .. like
URL,etc.
13. Press '|' to see response header.
14. press D for download manager.

Squirrelmail and Gmail look good in elinks.

15. Press q to quit.

Feb 17, 2009

GNOME and Firefox in Kannada

Just installed kannada and got basic apps in kannada. Note: openoffice is something I use once in a bluemoon so did not bother about it at all.

I am running Debain lenny recently apt-get updated and installed. I got these quirks sorted out.

1) got Kannada Unicode to render properly on Firefox, after spoiling it badly.
2) got to type Kannada properly on all places
3) got Firefox translations for kannada
4) set kannada as preferred language in Firefox ( Firefox tells websites about this. The only website that honoured the setting was google, but i was pleased)
5) Get the whole gnome in Kannada

1) Kannada Unicode rendering on Firefox :
This really should not have been a problem at all. This was my own stupidity. Even before I started out to go to some Kannada website, I airily set a few fonts too Freesans. Then i saw that pages dont render properly, after I tried different stupidities franctically and vainly , I thought I will just reset all the configuration. To do this quick, I just entered about:config and researched for freesans, and "reset"' the values to defaults. This fixed the rendering and I was back in business.

As Sans-Serif is a magic font, it chooses the right kannada fonts magically.

And obviously, before starting off with anything ttf-indic-fonts were installed.

2) Kannada typing in all places.
This was simple. After a bit of googling (I wish I hadn't erased the history of Firefox) I found a page where a Japanese guy had solved the same problem like this :

GTK_IM_MODULE="scim-bridge"

in /etc/X11/xinit/xinput.d/scim .

This worked like magic, I could use SCIM in all places, after I used im-switch to set scim as my default Input module.

For getting easy Kannada typing, I needed to install scim, scim-m17n and itrans packages and these also pulled some dependencies. After that, itt was smooth sailing with kn-itrans option available under Kannada.

To get the language list, just click the little keyboard icon in the system tray. ( After first installation, you need to re-login to get it). Note:you need to Left click on the system tray SCIM icon(little keyboard), not right click, which would give you setup options.

3) Firefox kannada translation
This one was easy

$ apt-get install iceweasel-l10n-kn
$ LANG=kn_IN iceweasel

The LANG=kn_IN iceweasel can be kept in a script and the panel launcher's properties could be set to launch the script. Anyways, Item (5) must obsolete it if it succeeds.

4) Preferred web content set to kannada in Firefox.

Again, pretty Simple:

Main Menu->Edit/Tools-> Preferences->Content->Languages

Or if you already followed item (3):

ಮುಖ್ಯ ಮೆನು->ಸಂಪಾದನೆ->ಆದ್ಯತೆಗಳು->ಒಳಅಂಶಗಳು->ಭಾಷೆಗಳು

Once you add Kannada in the list of languages, dont forget to move it to the top(order indicates the priority). Once this is done, you must find that google presents itself in Kannada.

5) GNOME in Kannada

I searched for kannada packages for GNOME for a long time. Then an angel from #kannada on irc.freenode.net made me realize that Kannada was installed with GNOME
all along! Stupid me. Just checked /usr/share/locale/kn/LC_MESSAGES/ and they were all there. But LANG=kn_IN gedit, LC_ALL=kn_IN gedit, all failed to present in Kannada.Then the same angel hinted me to run

dpkg-reconfigure locales

That reminded me that I was presented with the same UI during installation, and I had neglected it. Damn! Well, it re-generated and configured the languages I chose. after that LANG=kn_IN gedit just worked. So If I am not wrong, a re-login should add Kannada to the list of languages at the GDM login screen, and all the LANG=kn_IN should be unnecessary.

I will be writing to the GNOME's Debain package manager asking to include dpkg-reconfigure locales as a menu item in system->administration :-P.

Update:
I have rebooted and here is a screenshot :

Jun 3, 2008

Power saving on GNU/Linux laptops

  1. Forget all snazzy desktop stuff. Especially those that update the screen unnecessarily.
  2. Try this: http://lesswatts.org .
  3. If you have a IBM THinkpad check out this one too: http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption


Then also try these tips :

  1. In Firefox: disable prefetch. For that :
    • In urlbar type about:config
    • In the resulting table.. type "prefetch" in the search box to filter out those keys that have "prefetch" in them.
    • In the result, set "network.prefetch-next" to "false".
      • If you have Stumbleupon installed, disable it's prefetch too. stumbleupon.somenumber.prefetch
    • Unless you are a heavy user of gmail, use the simple html mode.
  2. Use text based browsers unless the page demands a GUI browser. Elinks is an excellent choice.
  3. Disable anything that blinks/ updates the screen. This makes X wake up the CPU on every update.
    • Disable blinking cursors. Many terminals allow a way to disable the blinking of the cursor.
    • Disable the "seconds" indicator on the clock. Really, are you on a race track ?
  4. Disable "system monitor" "battery monitor" and such other applets. Configure key shortcuts that run a command like "uptime" "date" "acpi" or somthing like that and pipe it to xmessage or something like that. Also havea script that .. every 30 seconds call these commands and checks for dangerous values. If any, popout a xmessage.
  5. Have a decent amount of RAM. This reduces the kernel having to wake the hard disk often to play with the swap.
  6. Remove anything unnecessary. Unnecessary daemons, Unnecessary devices, Unnecessay drivers, etc..
  7. I dont know if this works: Try using small flash based drives to store frequently used small documents, music, etc. This brings disk usage to a minimum.

May 29, 2008

Firefox div height relative to viewport works!

If you were trying to set the height of a div or any other object for that matter relative to the height if the viewport, This might be a solution. [ Blogspot eats up html.. even in compose box.]

I was actually facing the same problem.. few google searches, jumping between a few IRC channels later, I was about to give up. Then just out of thin air .. I tried the above .. And it worked.

If this solution existed somewhere else, please let me know.. so that next time I can use better search params.

May 7, 2008

Useful XKCD charts

Internet / World Wide Web (www)

http://xkcd.com/195/ Map of the Internet.

http://xkcd.com/256/ Online communities

http://xkcd.com/802/ Online communities 2.

http://xkcd.com/124/ Blogofractal

http://xkcd.com/94/ AIM Profile creation flowchart.

http://xkcd.com/1335/ When can we disturb them?
http://xkcd.com/now is now a shortcut to the above.

http://xkcd.com/773/ Intersection of what university websites contain and what people really look for.

Science


http://xkcd.com/388/ Grapefruit varieties

http://xkcd.com/1056/ Best known Felines

http://xkcd.com/273/ Electromagnetic spectrum.

http://xkcd.com/1080/ Visual Field tester

Quantity comparisons


http://xkcd.com/482/ HeightChart - the observable universe, from top to bottom.

http://xkcd.com/1040/large/ Lakes and oceans

http://xkcd.com/485/ DepthChart - Size of matters on a log scale.

http://xkcd.com/1338/ Earth's Land Mammals By Weight

http://xkcd.com/1389/ Solar system solid surfaces stitched together

http://xkcd.com/1461/large/ Spacecraft mass measured in horses.

http://xkcd.com/1649/ Fluids manufactured in US

Units of measure


http://xkcd.com/526/ Converting to metric.

http://xkcd.com/394/ Kilobytes.. there are several of them.

http://xkcd.com/1205/ Is it worth the time?

Nature Alarm


http://xkcd.com/1379/

http://xkcd.com/1732/ Earth Temperature timeline/

 

Timelines


http://xkcd.com/1491/large/ Stories Published Time Vs Time they are set in

http://xkcd.com/1392/ Dominant sport players over time

http://xkcd.com/1410/ California Draught

Misc


http://xkcd.com/832/ Complete map of optimal Tic-Tac-Toe Moves

http://xkcd.com/1196/ Subways of North America

http://xkcd.com/1468/ Worries

http://xkcd.com/1509/ US Movie Background Cheat Sheet

http://xkcd.com/1688 Map Age Guide

http://xkcd.com/1626/ Judgement day (Not really a chart, but I wish this happens one day)

Mar 13, 2008

Time Lapse Video using CHDK

As mentioned earlier, I own a Canon A570 and run CHDK on it . Using a script I took a Time Lapse Video . This is how you can do it using CHDK. This is how they turn out.

And this is how mine turned out.



You can also download High Resolution [786 x 516, 10.00 fps] [if my laptop is switched on. Look at the status box on the top right of my blog] it. It has 76 frames taken at an interval of 20 seconds and runs at 10 frames per second speed. I used mencoder to encode the series of photos into a movie.

Update:
Made two more timelapse videos





Original High resolution videos can be found here .

Jan 19, 2008

Linux is not the end of being "Open source"

Most people have the feeling that using or just installing GNU/Linux is both the beginning and end of the Free Software and "Open Source" philosophy. But if you see their businesses, you will understand that they are anything but "open".
One or more of these usually show that the other end has no clue about "Free and Open Source" philosophy. or they are afraid to give you the real clue about the philosophy :-) .

1) They "use" GNU/Linux and other FOSS products, but their product itself is closed and proprietary. In other words, it runs over "Free and Open Source Software", but is not "Free and Open Source Software" itself. This also includes plug-ins and extensions for existing "Free and Open Source Software".
2) It keeps consuming and spewing data in an extremely non-standard and non-flexible format.
3) All development is done in-house and other developers are warded off if they come into their "territory", at all times
4) All the source code is available, but you can compile it and use it only if you have proprietary compiler/ toolkit.
5) The product is not a complete software, but is a value addition.
6) They build a custom software for you , they tell you it is open source, because the OS it runs on, any server it runs on, The interpreters it uses , the compiler they chose everything is "Free and Open Source Software". But they are not ready to give you the source of the custom Software they built for you.
7) They don't have a proper "copyright" and "license" section anywhere in the Source, and /or don't give credit to those people from whom they got code snippets, and/or the libraries where due.

Jan 3, 2008

CHDK Firmware: Unleash the Power in your 'PowerShot'.

Today, it is not a surprise if you find GNU/Linux that can run on something which you wouldn't guess even in your dreams.. So I set out on searching if there is a GNU/Linux that can run on my Canon A750 IS. I was disappointed when I found that the only result I felt was right, turned out to be an April fool joke.

But my search was not entirely useless though. In fact, It was more exciting than just getting a shell on the camera. I stumbled upon a Free and Open Source firmware add-on for several Canon A750. The project is called CHDK (http://chdk.wikia.com). It gives amazing number of possibilites including some standard features like raw CCD dumps and video compression unfortunately not provided by Canon.

As a precaution, I suggest you wear a seatbelt and have a glass of water/ friend ready before you read the entire feature list.

Jan 1, 2008

Making Images seamless horizontally or vertically only.

I needed to take a scenery and tile it horizontally ( the "Make seamless" plug-in would only make it seamless both vertically and horizontally at the same time ), after 2 tries I got the right steps to to make an image seamless horizontally or vertically only.

These steps are for The GIMP, for making images seamless horizontally. You can guess the steps to make a vertically seamless image easily from this.

1) Open the image in GIMP . (Lets call the default layer the "base")


2) Select and copy the left 1/3rd of the "base" layer.



3) Paste it in a new transparent layer (let us call it "left on right") at the right 1/3rd of the image


4) Select and copy the right 1/3rd of the "base" layer.

5) Paste it in a new transparent layer (let us call it "right on left") at the left 1/3rd of the image



6) Add white layer masks to both the new layers.


7) Select the "blend" tool - use the "Foreground to background" gradient, linear blend mode.
(make sure the 2 colors are black and white)

8) On the layer mask of "right on left" layer, draw a gradient from exactly 1/3rd of the image, all the way to the left boundary of the image.



9) On the layer mask of "left on right" layer, draw a gradient from exactly 2/3rd of the image, all the way to the rightmost boundary of the image.( or you can also copy "right on left"'s mask and paste it on "left to right"'s mask and flip it horizontally)


10) Flatten the image (if necessary.. I haven't)

11) Crop away 1/6th of the image from left and right each.

becomes

With these, the image will now be seamless horizontally, retaining the nature of the image vertically.


----
You can use other portion sizes too instead of 1/3rds and 1/6ths if you have got the logic.