Installing Sublime Web Inspector (and making it work on Ubuntu)

Sublime Web Inspector is a very nice add-on for Sublime Text 2 that allows you to debug JavaScript (running in Chrome) right in Sublime. This will walk you through installing it on an Ubuntu-flavoured machine.

You will need to have installed:

  • Sublime Text 2
  • Chrome (chromium-browser in apt)

Install Sublime Package Control

If you have already installed Sublime Package Control, skip to “Install Web Inspector”.

Open Sublime Text 2.
Open the Sublime Text console by pressing CTRL+` (Control + Backtick).
Copy and paste the following into the console, and press enter:

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')

You can get the newest version of the package control installation instructions from: http://wbond.net/sublime_packages/package_control/installation .

Wait till the script finishes, then restart Sublime.

Install Web Inspector

Back up and install Sublime Package Control if you don’t have it already.
Now you can use the command palette (CTRL + SHIFT + P) to install the Web Inspector plugin:
Screenshot at 2013-03-18 15:35:04

Screenshot at 2013-03-18 15:35:49

Then, open Preferences -> Package Settings -> Web Inspector -> Settings – Default and modify the linux path to the chromium-browser executable as follows:
Screenshot at 2013-03-18 15:37:04
BTW, you can see I have some other nice (though not universally loved) add-ons (Bracket Highlighter, DocBlockr, SublimeLinter) installed for Sublime (all available through Package Control), they are also worth a look.

Change the /Application/whatever link to point to /usr/bin/chromium-browser (the most probable place for your chromium executable) -
Screenshot at 2013-03-18 15:37:32

The only config change necessary – change the path and save:
Screenshot at 2013-03-18 15:38:06

Use the command palette and choose Web Inspector (or press CTRL+SHIFT+R to choose the Web Inspector). Choose “Start Google Chrome with remote debug port 9222″. Web Inspector now opens chromium-browser with the --remote-debugging-port=9222 argument, thereby allowing Web Inspector to connect to Chrome’s remote debugging functionality.
Screenshot at 2013-03-18 15:45:03

You can see Chrome listening on port 9222:
Screenshot at 2013-03-18 15:48:36

In the newly opened chrome, go to the page you want to work on. Also open its source in Sublime Text.

Press CTRL+SHIFT+R (or choose Web Inspector through the control palette) and choose “Start Debugging”. Then choose the relevant Chrome tab (not pictured, because of, uhm, my tabs).
Screenshot at 2013-03-18 15:40:25

You will now see the Web Inspector is connected to your browser, look at the console output right inside Sublime Text:
Screenshot at 2013-03-18 15:47:31

Go view the screen cast at the Web Inspector page to get an idea of what it can do and how to change its settings.

Sex does not thrive on monotony

Anais_NinAnaïs Nin, excerpt from a letter to an anonymous client for whom she was writing erotic fiction, expressing her frustration at the client’s insistence that she concentrate on the mechanics of sex:

‘You have taught us more than anyone I know how wrong it is not to mix [sex] with emotion, hunger, desire, lust, whims, caprices, personal ties, deeper relationships which change its color, flavor, rhythms, intensities…

The source of sexual power is curiosity, passion. You are watching its little flame die of asphyxiation. Sex does not thrive on monotony. Without feeling, inventions, moods, no surprises in bed. Sex must be mixed with tears, laughter, words, promises, scenes, jealousy, envy, all of the spices of fear, foreign travel, new faces, novels, stories, dreams, fantasies, music, dancing, opium, wine…

Not two hairs alike, but you will not let us waste words on a description of hair; not two odors, but if we expand on this, you cry “Cut the poetry.” Not two skins with the same texture, and never the same light, temperature, shadows, never the same gesture’

Read the full letter here

Link dump 005

From Shitterton to Lord Herefords Knob

Map of the world with some vaguely rude place names highlighted
http://maps.geotastic.org/rude/

 

Cutest frog award goes to

The Desert Rain Frog:

 

Jesus christ is what?

Old, all over the interwebs, and Poe’s law trips me up, but still funny

 

Famous skylines without light pollution

“blending city scenes — shot and altered to eliminate lights and other distractions — and the night skies from less populated locations that fall on the same latitudes. The result is what city dwellers might see in the absence of light pollution.”
http://www.nytimes.com/interactive/2013/02/03/magazine/look-stars.html
Look-stars-slide-746N-jumbo

UAVs and rhino poaching

I’m a certified geek, which means, among other things, that I had to sign a formal document in which I declare my belief in technology as a cure for the world’s ills.

The interwebs has been full of Orwellian stories about UAV / drone capabilities the last few weeks, with things like ARGUS popping up.

Seeker IIBut UAVs can be used for good, too.

The state agency that is responsible for managing the state-run national parks in South Africa, SANparks, has already deployed Seeker II military-spec UAVs to help curb poaching, and Google has provided a lot of funds for UAV-based anti poaching projects.

Technological measures like UAVs might help, but it won’t solve the problem. SANparks manages 20 parks with a combined surface area of over 40,802 km² (15,753 sq mi), an area bigger than Belgium and comparable in size to Switzerland or the Netherlands. Only considering SANparks also doesn’t count the hundreds of private wildlife reserves that have also been hit by (rhino) poaching. To add to the problem the parks aren’t contiguous – they are spread over the South Africa’s 1,221,037km² surface. Many parks are also on the South African border, making it easier for people from neighbouring countries to cross into the wildlife reserves.

This makes poaching a problem of patrolling hugely long borders dispersed over a wide area. As the US learned in the so-called War on Drugs, it is not easy to patrol borders against intrusion by small groups of people.

Drugs have also shown us that reducing supply does nothing to reduce demand. The answer to rhino poaching is not rooted in technology buy will be found when we figure out how to reduce demand.

Huge meteorite over Russia on 15/02/2013, chapter 002

Reuters reports 400 people hurt:

http://www.reuters.com/article/2013/02/15/us-russia-meteorite-idUSBRE91E05Z20130215

A local ministry official said the meteor shower may have been connected with an asteroid the size of an Olympic swimming pool that was due to pass Earth at a distance of 27,520 km (17,100 miles) but this could not be confirmed.

Windows were shattered on Chelyabinsk’s central Lenin Street and some of the frames of shop fronts buckled.

A loud noise, resembling an explosion, rang out at around 9.20 a.m. (0520 GMT). The shockwave could be felt in apartment buildings in the industrial city’s centre.

“I was standing at a bus stop, seeing off my girlfriend,” said Andrei, a local resident who did not give his second name. “Then there was a flash and I saw a trail of smoke across the sky and felt a shockwave that smashed windows.”

Associated Press release:

http://hosted.ap.org/dynamic/stories/E/EU_RUSSIA_METEORITE?SITE=AP&SECTION=HOME&TEMPLATE=DEFAULT

“There was panic. People had no idea what was happening. Everyone was going around to people’s houses to check if they were OK,” said Sergey Hametov, a resident of Chelyabinsk, about 1500 kilometers (930 miles) east of Moscow, the biggest city in the affected region.

Video from close to the epicentre (is that the correct word?)

Twitter hashtag is #Челябинск

 

Link dump 004

The man who survived both the Hiroshima and Nagasaki atomic bombings

Tsutomu Yamaguchi lived in Nagasaki, but was in Hiroshima for a three-month-long business trip. The Hiroshima atomic bombing occured on the day he was planning to go back to Nagasaki, and he sustained serious burns and other injuries. Despite his injuries he reported for work in Nagasaki three days later, and was then caught in the Nagasaki blast. He was 3km from ground zero in both blasts.

He died in 2010, at the age of 93.

 

Nue York: Self-Portraits of a Bare Urban Citizen

Subway600x400Photographer Erica Simone created a series of self-portrait photographs of her doing typically New York City things in the nude.
The artist statement says the project “bloomed from an initial questioning about clothing and its importance in society“. That is questioning I can understand – I’ve wondered why nudity comes with stigma while we are all naked all the time, just underneath a thin veneer of clothes. But I also think that a project like this takes way more guts than I have.

Nue York project

 

Beast roast calculator

How long to roast your specific beast to your preferred degree of doneness. Couldn’t make the kilogram setting work on Firefox, but great calculator anyway.

http://justroast.it/

 

Glass sculptures of (mostly lethal) microbes

Malaria-Luke-JerramUK Artist Luke Jerram makes beautiful glass sculptures of microbes. HIV, smallpox, malaria, and other star microbes are featured.

Luke Jerram glass microbiology gallery

 

Photo manipulation of military images

Either Iran photoshopped this photo of their stealth fighter to fool people into thinking that it’s flying OR it’s so stealthy that it was invisible when the stock photo was taken:

http://gizmodo.com/5983870/iran-photoshopped-its-new-stealth-fighter-jet-to-look-like-it-was-flying-when-it-totally-wasnt

Also interesting is how the Soviet government altered historical images:

http://en.wikipedia.org/wiki/Censorship_of_images_in_the_Soviet_Union

 

Apocrypha XLI

En hij zeide tot hem: Vriend! hoe zijt gij hier ingekomen, geen bruilofskleed aanhebbende?
– Mattheüs 22:12

Ek was ook op die bruilof te Kana,
onder die hangende tuine –
rangskikkings van proteas
en versilwerde lukwartblare –
tussen die pienk gepoeierde rose –
gekunstelde gesigte vol verwagting –
tussen die spierwit gestyseldes
ry op ry gedek
volgens belangrikheid –
tussen die bewoë woorde,
die sluk aan ‘n knop aan die keel,
want sy is my enigste dogter,
en hy lyk vir my so baie
na tant Koek se hoenderhaan –
tussen die waarskuwings oor die weë
van ‘n vader en ‘n seun,
van drink maar nog ‘n glasie
en ‘n mislike misplaaste grap –
tussen die clichès oor die Christus
wat vir almal as voorbeeld dien
en die oproerige geraas
van bottels wat begin leeg raak
en waarmee sal ‘n jongeling
sy pad suiwer hou –
tussen die hoor-hoors vir ‘n bruidegom
want hy’s ‘n lekker kêrel lekker
kêrel baie dankie vir my moeder
en ons sê almal so
met ‘n geskater skater skater
oor gisteraand se ramparty –
tussen die geblêr van saksofoon-soprane
en this is my lovely day
middeljarige getroudes wat weer die feeling kry
skuif-skuif stywe rug
al in die rondte
en oompies wat naarstigtelik begin te klou
en potsierlike spronge maak
tantes wat goedkeurend skud
en kyk vir Herklaas kyk vir Herklaas
want dis is mos bruilof
gooi die wyn gooi die wyn
en die spierwit reinheid
van ‘n bruidsgewaad wat sleep
oor ‘n bemorste vloer.

M.M. Walters, uit Apocrypha, 1969