Word wrap in Eclipse

Here is a quick tip for the people, like me, being driven mental working with long lines and not being able to word wrap them in Eclipse: install a 3rd party plugin named AhtiK Eclipse WordWrap from http://ahtik.com/eclipse-update/ in your IDE.

To do so, in Eclipse, go to the Help menu, then Install new software, and add a new software site to it, http://ahtik.com/eclipse-update/,

eclipse1

Click on Next, make sure that the item to be installed is in the com.ahtik.wordrap package, and then press Next again,

eclipse2

As it is an unsigned plugin, you might get a warning similar to the one in the screenshot below – you might want review the package name again, and press ok if you are happy with the fact that the plugin is unsigned, as in, you trust that it came from the correct location and not from a man-in-the-middle, you trust that this is the correct package file, and you trust the publisher – for more information on the plugin and the author, please refer to the plugin author’s website at http://ahtik.com/blog/projects/eclipse-word-wrap/.

eclipse3

Restart the IDE, and once in again, simply right click the text editor window. You will be presented with a menu similar to the one below,

eclipse4

Click Word Warp, and your editor should be word wrapping long lines for you now. Un-clicking Word Wrap will deactivate word wrapping and bring your editor back to it’s normal state.

eclipse

For news and more information about the plugin, please refer to AhtiK Eclipse WordWrap‘s official website at http://ahtik.com/blog/projects/eclipse-word-wrap/.

Protecting your online privacy

The Tor website describes a common technique used on the internet called traffic analysis,

Traffic analysis can be used to infer who is talking to whom over a public network. Knowing the source and destination of your Internet traffic allows others to track your behavior and interests.

This can impact your checkbook if, for example, an e-commerce site uses price discrimination based on your country or institution of origin. It can even threaten your job and physical safety by revealing who and where you are.

For example, if you’re travelling abroad and you connect to your employer’s computers to check or send mail, you can inadvertently reveal your national origin and professional affiliation to anyone observing the network, even if the connection is encrypted.

Other than traffic analysis, most websites you visit track who you are, where you are, your habits, behaviour, affiliations, preferences, what are you looking for, and it even goes as far as tracking and collecting your, otherwise personal and private, website browsing history.

This website for one, you are viewing it on the clear, unencrypted, and your internet provider can easily catalogue it as viewed by you, someone with a sniffer (a sort of widely available internet traffic capturing software) can also browse it with you in its full format (including your personal messages and comments), and anyone, anywhere, sniffing in between your connection and this website can do the same.

An internet provider or authority might also block access for all sorts of censoring reasons, what will censor you and everybody using that line of ever reading this website if you are reading this on the clear, as you are, right now.

Webmasters insert advertisement code in their webpages in order to monetize their websites – a code shared among many websites on the internet – this code sends over and over information about you directly to the marketing agencies desks. This information only gets refined further as you browse sites containing ads from this very same advertisement agency, until a full individual profile is formed. There is a science, a discipline behind it and all.

Companies embed code in their webpages to track your information and generate a profile about you, a profile you never authorized them to do so, and this profile is used by themselves or sold/handed to 3rd parties, including governments, to profile individuals, entire regions, countries, groups, and so on.

Lack of privacy can be very damaging, as most people are starting to take notice of for example when they can not delete their own data out of Facebook – your data is completely out of your control, you said too much about yourself, it is all out in the wild, you can not delete all that you ever put in it, and you can also not delete your profile from none of this companies that sneakily tracked and profiled you, nor from who they sold this information to, without even requesting your authorization to do so.

Just to clarify, this tracking and profiling do not appear to you – they are hidden from you. You might be not fully aware of what is happening, but there is a lot of software grabbing, processing and recording the more they can get out of you every time you browse a web page; because for this companies, the collected information, is worth a lot financially.

They are basically stealing your privacy, in an unauthorized exposure of who you are and what your location, habits, behavior, affiliations and preferences are, opening a window to your private life, in order to enrich themselves, and only. In order to gather intelligence. Mining people’s personal information like mining for gold; without ownership, licensing nor compensation – in other words, this is robbery done through a not yet properly regulated medium.

Yet as usual, the law enforcement protects who the big money, rather the small, comes from.

So, if you try to acquire personal, otherwise private data out of the companies that acquire unauthorized data out of you, you are a trespasser and go to jail; but if this companies methodically steal and sell your personal, otherwise private data, they are doing “business”.

Below are the three main useful and basic add-ons for the Mozilla Firefox web browser to help you reinforce you privacy and explicitly deny the grab of anything away from you while browsing the internet; most browsers have their own versions of the same, and you can look for them in their respective add on catalogues.

Ghostery

Protect your privacy. See who’s tracking your web browsing and block them with Ghostery.

http://addons.mozilla.org/en-US/firefox/addon/ghostery/

In the post-install script, check all filters and save – this add-on will block most known trackers from collecting your data and habits on the internet,whatever purpose that might had.

Adblock plus

Annoyed by adverts? Troubled by tracking? Bothered by banners? Install
Adblock Plus now to regain control of the internet and change the way
that you view the web.

http://addons.mozilla.org/en-US/firefox/addon/adblock-plus/

HTTPS Everywhere

HTTPS Everywhere encrypts your communications with a number of major websites.

Many sites on the web offer some limited support for encryption over HTTPS,
but make it difficult to use. For instance, they may default to
unencrypted HTTP, or fill encrypted pages with links that go back to the
unencrypted site.

The HTTPS Everywhere extension fixes these problems by rewriting all requests to these sites to HTTPS.

http://www.eff.org/https-everywhere

All plugins will update themselves with time, and you can get specific lists for Adblock plus from the EasyList website (such as lists for French language websites, German etc),

EasyList is the primary Easy subscription that removes adverts from English webpages, including unwanted frames, images and objects. It is the most popular list for Adblock Plus, with over 7 million daily users, and forms the basis of over a dozen combination and supplementary subscriptions.

http://adblockplus.org/en/subscriptions

This add ons do not affect the browsing experience in any way, other than removing trackers, advertisement and encrypting your connection so nobody can sniff your internet activity – pages will also appear like normal, just with all of its advertisements (such as Google Adsense, Clicksor, etc) blanked out.

Pages actually do load faster with them even if they are encrypted, as there is no overhead loading marketing and tracking related data from miscellaneous servers at every single page load.

If you want to go further and really go full-on anonymous to the internet, you might want to give Tor a go,

Tor is free software and an open network that helps
you defend against a form of network surveillance that
threatens personal freedom and privacy, confidential business
activities and relationships, and state security known as traffic analysis.

Tor protects you by bouncing your communications around a
distributed network of relays run by volunteers all around
the world: it prevents somebody watching your Internet
connection from learning what sites you visit, and it prevents
the sites you visit from learning your physical location.
Tor works with many of your existing applications, including
web browsers, instant messaging clients, remote login, and
other applications based on the TCP protocol.

http://www.torproject.org/

The Tor distribution comes with a Firefox plugin – the plugin sits in the bottom bar of the browser, and you can simply click a button to turn your own anonymity on and off.

All the software listed above is free and open sourced (which means, if you have the knowledge you can modify, extend or simplify it at will), they run in a multitude of different machines and operating systems, and are readily available in very easy to install packages.

How to use a USB 3G/4G modem with Linux

I own a USB 4G modem from T-Mobile Czech Republic, so as I do not use Windows at all, and all my machines are PCs, I needed it to work with Linux.

After following all official documentation and looking all over search engines through tens of tens of discussions in forums, none of them worked. Some almost worked, others did not work at all. There are some fancy graphical user interfaces for Gnome and KDE; I used the Gnome one and it refused to see my modem as mobile broadband, yet offered no parameters to manually input a device I plugged in, and of which I know its name.

So I spent quite some while to realize how to get it to work, and to save someone time, I will post them all below. I personally find it easier than try to get the GUI to work simply because it have buttons in it, and the script have not.

Parameters might change according to your provider (mine as I said previously is T-Mobile Czech Republic), there should be some documentation containing the parameters described here as %username%, %password% and %providerhost% available in their website.

First, plug the USB cable in. Look at the syslog (“tail /var/log/syslog”) for the device name it was registered under. Mine is at /dev/ttyUSB0. From now on, the device name in your syslog will be referenced as %devicename%.

Second, create a file named “/etc/ppp/peers/4ginternet” with the contents below

debug
connect “/usr/sbin/chat -v -f /etc/chatscripts/4ginternet”
user “%username%”
password “%password%”
noauth
usepeerdns
%devicename%
115200
local
nocrtscts
defaultroute
noipdefault
lcp-echo-interval 0
lcp-echo-failure 0

This file will start the script that initializes the modem, waits for the modem to give us a connection, and then negotiate all parameters that we will use on the internet.

And yes, no PAP. All official documentation say to use PAP, I used it, and the modem returned me message after message saying “no authentication is available”. So the user/password above did the trick. And yes, I am online through it right now writing this.

Third, create a file named “/etc/chatscripts/4ginternet” with the contents below

” ATZ1
” AT+CGDCONT=1,”PPP”,”%providerhost%”,”0,0″,0,0
OK “ATDT*99#”
CONNECT dc

This file initializes the modem and acquires an internet connection. For T-Mobile Czech Republic the host is “internet.t-mobile.cz”.

Now you can type in a terminal or console “pppd call 4ginternet” to start your internet connection – the progress or any errors will be in the syslog, so “tail /var/log/syslog” will give you a clear picture of whats going on. To finish the connection, you can type “kill -9 pppd” or simply stop pppd (the point-to-point protocol daemon) however you may like.