cd /usr/src/android-ndk-r6/samples/san-angeles/ /usr/src/android-ndk-r6/ndk-buildSimple enough. Second step:
You will then need to generate your final .apk through the usual means. -- Android NDK Dev GuideThanks a ****ing lot! In addition the documentation is very much Eclipse-centered - and I can't be bothered to install and configure all the Eclipse stack for a mere Java wrapper for the above-generated
.so file XD
We first need to use the 'android' wrapper and download the "SDK Platform Android 2.2, API 8, revision 3" - aka "android-8", the first environment to support OpenGL ES 2.
/usr/src/android-sdk-linux_x86/tools/androidIt appears we first need to "manage the project", more precisely import from an existing project: http://developer.android.com/guide/developing/projects/projects-cmdline.html So we create a project by importing the sources from the current directory:
/usr/src/android-sdk-linux_x86/tools/android update project \ --name san-angeles --path . --target "android-8"Then we use ant to build the thing: http://developer.android.com/guide/developing/building/building-cmdline.html
apt-get install ant openjdk-6-jdk ant debug # avoid messing with signingWe now have a
bin/san-angeles-debug.apk and we can run it in the emulator. Create a new "Virtual device" using the "android-8" platform we downloaded above, and launch it. Given the time needed to boot the OS, I suggest enabling snapshots. Scaling to display resulted in a very tiny, dark and slow display, in a first step I suggest using a non-scaled one.
/usr/src/android-sdk-linux_x86/tools/androidAt last we can run it! Install it in the emulator:
/usr/src/android-sdk-linux_x86/platform-tools/adb install -r bin/san-angeles-debug.apkYou'll find a DemoActivity in your apps directory
Sorry! The application GL2JNI (process com.android.gl2jni) has stopped unexpectedly. Please try again.The emulator apparently doesn't advertise EGL_OPENGL_ES2_BIT (checked in in
GL2JNIView.java).
If you try to by-pass it, you'll get loads of:
E/libEGL ( 333): called unimplemented OpenGL ES APIIt's worth noting the OpenGLES20 sample from the "API Demos" application uses a fall-back OpenGL ES 1 renderer if v2 is not available - it made me mistakenly believe that OpenGL ES 2 was supported only from Java >( OpenGL ES 2 is not supported in the emulator as of 2011-09-17 - period.
I am haunted by the nagging fear that I have mailboxes, tucked into a
dark corner of an office somewhere, and perhaps even full of checks
and important documents, that I don't know exist.
Notice the glass slats in the window it s a nifty, though not airtight, alternative to our regular windows. More on that later. More of the inside:
A few days ago I blogged about my main computer s configuration files and desktop s appearance and today I managed to add a few little tweaks to those, they are:
machine google.com login example@gmail.com password yourpassword
4. Your configuration should be good to go now, so here s a few examples on goobook s usage within Mutt:set query_command="goobook query '%s'" bind editor <Tab> complete-query macro index,pager a "<pipe-message>goobook add<return>" "Add sender's address to your Google contacts"
I definitely love it, it s clear and clean and most of all it has everything I need, no extra toolbars or menus. If you agree with me, open up the /etc/gdm3/greeter.gconf-defaults file and do the needed changes. This is how your greeter.gconf-defaults file should look like:
We are close to the end but we are missing an important detail: how can you safely remove bottom s toolbar and menus for a clearer and cleaner Login Screen? Open up the /var/lib/gdm3/.gconf.mandatory/%gconf-tree.xml file, search for the <dir name= general > section and apply the following change:/desktop/gnome/background/picture_filename /path/to/your/dusty-bg/file # dusty's background can be downloaded here. /desktop/gnome/interface/gtk_theme Darklooks # this is my main theme, feel free to adapt that to your needs. /apps/gdm/simple-greeter/logo_icon_name debian-swirl # this is the default on Debian's systems. /desktop/gnome/sound/event_sounds false # I don't like hearing any sound when when I am prompted to insert my user's details on the Login Screen. /apps/gdm/simple-greeter/disable_user_list true # users list will be disabled, you won't be able to select your username from a list but you'll have to insert that yourself. /apps/metacity/general/compositing_manager false # default, no need to change this. /apps/gnome-power-manager/ui/icon_policy never # default, no need to change this.
But what if you prefer keeping the toolbar as it is, but you definitely don t like seeing the Accessibility icon appearing on your Login Screen? On the same file as above, search for the <dir name= accessibility > section and modify the following string as it follows:- <entry name="compositing_manager" mtime="1315580582" type="bool" value="false"/> + <entry name="compositing_manager" mtime="1315580582" type="bool" value="true"/>
See you on my next blog post and don t forget to have a look at my GitHub s repository! Oh and follow me on Twitter!- <entry name="enable" mtime="1315580582" type="bool" value="true"/> + <entry name="enable" mtime="1315580582" type="bool" value="false"/>
I ve taught people how to travel. I focus mostly on the logistics: finding the right hotel, avoiding long lines But that s not why we travel. We travel to have enlightening experiences, to meet inspirational people, to be stimulated, to learn, and to grow. Travel has taught me the fun in having my cultural furniture rearranged and my ethnocentric self-assuredness walloped.He speaks of giving onesself permission to have a conversation with someone that doesn t speak a language you know, for instance. I got an email this spring from my longtime friend Jonathan Hall, who had moved to Mexico a couple of years ago. He invited my family and me to go to Mexico, generously offered to host us and show us around, and specifically mentioned my review of Rick Steves as a reason to do so, this was immediately intriguing. Due to his other plans, it was also something of a limited-time offer. Those of you that don t live in the USA may not know what sort of stories we get about Mexico over here. Most of them involve either illegal immigration to the USA or the Mexican drug war. Occasionally there is some sort of drug-related violence on the US side of the border as well, which always makes the news. There are a lot of people that have the perception that Mexico is a dangerous place to be. Terah even knows some people that grew up in Mexico and are too afraid to return. So we did some research, asked some questions, and it became pretty clear that yes, some parts of Mexico are dangerous, but many parts are really quite safe, and Jonathan had invited us to one of those. The reactions we got from Americans when we told them of our plan ranged from excitement that we would get to visit a beautiful country to concern and worry about our safety. Besides that, I knew almost no Spanish and Terah had a few high school and college classes years ago to go on. And, we knew that Mexico would, in many ways, be more different from the USA than Germany was. We concluded that this would get us out of our comfort zone in a significant way, have lots of great things to do, be a good experience for the boys, and something that we wouldn t do without Jonathan. So we bought the tickets for it! As you might notice, I m quite glad we did. I ll follow up with the details in the next stories, but for today I ll end with the story of getting there. It involves two cute boys, so of course it ll be interesting. Jacob is almost 5 and Oliver is 2, and neither one of them had flown for over a year. Despite leaving home at 5AM to drive to the airport (about an hour away), they were both awake and alert. Jacob was jabbering away the whole way there. He enjoyed the security process and found it interesting I had to explain that they were checking to make sure everyone was following the airplane rules. Then as we walked to our gate, he pressed his face against every window, looking at the parked airplanes in the dark. Oliver would see him doing this and run over to join him. With a bit of help, he noticed some airplanes had United Express painted on them, and others had American with an AA on them. He would talk about American AA and United Express airplanes for the rest of the week whenever he heard one in the sky. I sat between the boys on our flight to Dallas, and Terah was in the row ahead of us. This is how Jacob spent most of the flight.
And Oliver, who had the aisle seat, enjoyed paging through the inflight magazines, safety brochure, wifi instruction card, and airsickness bag.
The real highlight came at the Dallas/Ft. Worth (DFW) airport, where we had a connection. And the reason: we needed to take a train to get to our connecting gate. The DFW Skylink system really works very well but the boys cared most that it s a TRAIN. It was difficult to get them both away from it when we got off. They wanted to see it leave, stay and watch the next one come, etc. Jacob was only happy when he realized he could see the Skylink trains running high above the window at our departure gate for Guadalajara.
The 2.5-hour flight to Guadalajara got a little long for them, but they managed OK. We struck up several conversations with friendly people that knew English as we waited in various lines. It seems to be something of a rarity for American families with young children and no Mexican heritage to visit Mexico. People went out of their way to be friendly and welcoming even the customs officials. It felt like a great start to the visit. One Mexican man who was chatting with me encouraged me to learn some Spanish. I said my wife knows some, and that I had tried to learn some German back when I took foreign language classes. Laughing, he said, Why would you do that? Not as an insult; it just genuinely didn t seem useful to him. I think they were happy and proud that someone wanted to visit Mexico and was excited about it!
More to come.
In light of the fact that it seems possible to fit the plastic caps of
a Debian branded Swiss Army Knife (Last orders
today!) on an existing Swiss Army Knife (German written
howto as PDF), I started to think about which Victorinox Cybertool
would be the best fitting for me.
And because the Victorinox comparison page doesn t really show diffs, just
columns with floating text which are not very helpful for generating
diffs in your head, I used command line tools for that purpose:
wdiff
Because the floating texts are not line- but just whitespace-based,
the tool of choice is not diff but wdiff, a word-based diff. It encloses additions and removals
in + + and [- -] blocks.
(No, those aren t Japanese smileys although they look a lot like some.
^^).
The easiest and clearest way is to copy and paste the texts from Victorinox comparison page into some text files and
compare them with wdiff:
$ wdiff cybertool34.txt cybertool41.txtSo this already extracted the information which are the seven tools which are in the Cybertool 41, but not in the Cybertool 34. Nevertheless the diff is still not easily recognizable on the first glance. There are several ways to help here. First
+Schraubendreher 2.5mm,+ Pinzette, N hahle mit Nadel hr, +Holzs ge,+ Bit-Schl ssel( 5 mm Innensechskant f r die D-SUB Steckverbinder, 4 mm Innensechskant f r Bits, Bit Phillips 0, Bit Phillips 1, Bit-Schlitzschrauben 4 mm, Bit Phillips 2, Bit Hex 4 mm, Bit Torx 8, Bit Torx 10, Bit Torx 15 ), Kombizange( H lsenpresser, Drahtschneider ), Stech-Bohrahle, Kugelschreiber( auch zum DIP-Switch verstellen ), Mehrzweckhaken (Pakettr ger), +Metalls ge( Metallfeile, Nagelfeile, Nagelreiniger ),+ Dosen ffner( kleiner Schraubendreher ), Kleine Klinge, Grosse Klinge, Ring, inox, Mini-Schraubendreher, Kapselheber( Schraubendreher, Drahtabisolierer ), +Holzmeissel / Schaber,+ Bit-Halter, Stecknadel, inox, Schere, Korkenzieher, Zahnstocher
wdiff has an option --no-common (the
according short option is -3) which just shows added and
removed words:
$ wdiff -3 cybertool34.txt cybertool41.txt ====================================================================== +Schraubendreher 2.5mm,+ ====================================================================== +Holzs ge,+ ====================================================================== +Metalls ge( Metallfeile, Nagelfeile, Nagelreiniger ),+ ====================================================================== +Holzmeissel / Schaber,+ ======================================================================This is already way better to quickly recognize the actual differences. But if you still also want to see the common tools of the two knifes you need some visual help: One option is to use
wdiff s --terminal (or
short -t) option. Added words are then displayed inverse
and removed words are shown underlined (background and foreground
colors hardcoded as there is no invert colors style in CSS or HTML):
But some still like to to use color instead of the contrast-rich inverse and the easily to oversee underlining. This is where colordiff comes into play: colordiff colordiff is like syntax highlighting for diffs on the command line. I works with classic and unified diffs as well as with wdiffs and debdiffs (the$ wdiff -t cybertool34.txt cybertool41.txt
Schraubendreher 2.5mm, Pinzette, N hahle mit Nadel hr, Holzs ge, Bit-Schl ssel( 5 mm Innensechskant f r die D-SUB Steckverbinder, 4 mm Innensechskant f r Bits, Bit Phillips 0, Bit Phillips 1, Bit-Schlitzschrauben 4 mm, Bit Phillips 2, Bit Hex 4 mm, Bit Torx 8, Bit Torx 10, Bit Torx 15 ), Kombizange( H lsenpresser, Drahtschneider ), Stech-Bohrahle, Kugelschreiber( auch zum DIP-Switch verstellen ), Mehrzweckhaken (Pakettr ger), Metalls ge( Metallfeile, Nagelfeile, Nagelreiniger ), Dosen ffner( kleiner Schraubendreher ), Kleine Klinge, Druckkugelschreiber, Grosse Klinge, Ring, inox, Mini-Schraubendreher, Kapselheber( Schraubendreher, Drahtabisolierer ), Holzmeissel / Schaber, Bit-Halter, Stecknadel, inox, Schere, Korkenzieher, Zahnstocher
debdiff command is part of the
devscripts package).
$ wdiff cybertool34.txt cybertool41.txt colordiff(Coloured Screenshots done with ANSI HTML Adapter from the package aha.) Some, especially those who are used to git, are probably confused by the default choice of diff colors. This is easily fixable by writing the following into you
+Schraubendreher 2.5mm,+ Pinzette, N hahle mit Nadel hr, +Holzs ge,+ Bit-Schl ssel( 5 mm Innensechskant f r die D-SUB Steckverbinder, 4 mm Innensechskant f r Bits, Bit Phillips 0, Bit Phillips 1, Bit-Schlitzschrauben 4 mm, Bit Phillips 2, Bit Hex 4 mm, Bit Torx 8, Bit Torx 10, Bit Torx 15 ), Kombizange( H lsenpresser, Drahtschneider ), Stech-Bohrahle, Kugelschreiber( auch zum DIP-Switch verstellen ), Mehrzweckhaken (Pakettr ger), +Metalls ge( Metallfeile, Nagelfeile, Nagelreiniger ),+ Dosen ffner( kleiner Schraubendreher ), Kleine Klinge, Grosse Klinge, Ring, inox, Mini-Schraubendreher, Kapselheber( Schraubendreher, Drahtabisolierer ), +Holzmeissel / Schaber,+ Bit-Halter, Stecknadel, inox, Schere, Korkenzieher, Zahnstocher $ wdiff cybertool29.txt cybertool41.txt colordiff
+Schraubendreher 2.5mm,+ Pinzette, N hahle mit Nadel hr, +Holzs ge,+ Bit-Schl ssel( 5 mm Innensechskant f r die D-SUB Steckverbinder, 4 mm Innensechskant f r Bits, Bit Phillips 0, Bit Phillips 1, Bit-Schlitzschrauben 4 mm, Bit Phillips 2, Bit Hex 4 mm, Bit Torx 8, Bit Torx 10, Bit Torx 15 ), +Kombizange( H lsenpresser, Drahtschneider ),+ Stech-Bohrahle, +Kugelschreiber( auch zum DIP-Switch verstellen ), Mehrzweckhaken (Pakettr ger), Metalls ge( Metallfeile, Nagelfeile, Nagelreiniger ),+ Dosen ffner( kleiner Schraubendreher ), Kleine Klinge, [-Druckkugelschreiber,-] Grosse Klinge, Ring, inox, Mini-Schraubendreher, Kapselheber( Schraubendreher, Drahtabisolierer ), +Holzmeissel / Schaber,+ Bit-Halter, Stecknadel, inox, +Schere,+ Korkenzieher, Zahnstocher
~/.colordiffrc:
newtext=green oldtext=red diffstuff=darkblue cvsstuff=darkyellow(See also
/etc/colordiff for the defaults and hints.)
colordiff has by the way two operating modes:
$ colordiff cybertool29-lines.txt cybertool34-lines.txt 12a13,14 > Kombizange( H lsenpresser > Drahtschneider ) 13a16,17 > Kugelschreiber( auch zum DIP-Switch verstellen ) > Mehrzweckhaken (Pakettr ger) 16d19 < Druckkugelschreiber 25a29 > SchereOr as unifed diff with some context:
$ colordiff -u cybertool29-lines.txt cybertool34-lines.txt --- cybertool29-lines.txt 2011-08-31 20:55:37.195546238 +0200 +++ cybertool34-lines.txt 2011-08-31 20:55:11.667710504 +0200 @@ -10,10 +10,13 @@ Bit Torx 8 Bit Torx 10 Bit Torx 15 ) +Kombizange( H lsenpresser +Drahtschneider ) Stech-Bohrahle +Kugelschreiber( auch zum DIP-Switch verstellen ) +Mehrzweckhaken (Pakettr ger) Dosen ffner( kleiner Schraubendreher ) Kleine Klinge -Druckkugelschreiber Grosse Klinge Ring inox @@ -23,5 +26,6 @@ Bit-Halter Stecknadel inox +Schere Korkenzieher ZahnstocherSo if you want nicely colored diffs with Subversion like you re used to with git, you can use
svn diff colordiff.
This is a direct followup on my previous blog posting about calculating IPs and netmasks with the tools
netmask and prips. Kurt Roeckx (via e-mail) and Niall Donegan (via
a comment to that blog posting) both told me about the package sipcalc, and Kurt also mentioned the package ipcalc. Thanks for that! And since I found both useful, too,
let s put them in their own blog posting:
Both tools, ipcalc
and sipcalc offer a get all information at once mode
which are not present in the previously presented tool netmask.
ipcalc
ipcalc by default outputs all information and even in ANSI colors:
$ ipcalc 192.168.96.0/21 Address: 192.168.96.0 11000000.10101000.01100 000.00000000 Netmask: 255.255.248.0 = 21 11111111.11111111.11111 000.00000000 Wildcard: 0.0.7.255 00000000.00000000.00000 111.11111111 => Network: 192.168.96.0/21 11000000.10101000.01100 000.00000000 HostMin: 192.168.96.1 11000000.10101000.01100 000.00000001 HostMax: 192.168.103.254 11000000.10101000.01100 111.11111110 Broadcast: 192.168.103.255 11000000.10101000.01100 111.11111111 Hosts/Net: 2046 Class C, Private Internet(Coloured Screenshots done with ANSI HTML Adapter from the package aha.) You can suppress the bitwise option or directly output HTML via commandline options. For example
ipcalc -b -h 192.168.96.0/21
outputs the following content:
Yes, that s an HTML table and no preformatted text, just with a monospaced font. (I just removed the hardcoded text color from it, otherwise it would not look nice on dark backgrounds like in Planet Commandline s default color scheme.) Like netmask, ipcalc can also deaggregate IP ranges into largest possible networks:
Address: 192.168.96.0 Netmask: 255.255.248.0 = 21 Wildcard: 0.0.7.255 => Network: 192.168.96.0/21 HostMin: 192.168.96.1 HostMax: 192.168.103.254 Broadcast: 192.168.103.255 Hosts/Net: 2046 Class C, Private Internet
$ ipcalc 192.168.87.0 - 192.168.110.255 deaggregate 192.168.87.0 - 192.168.110.255 192.168.87.0/24 192.168.88.0/21 192.168.96.0/21 192.168.104.0/22 192.168.108.0/23 192.168.110.0/24(
ipcalc -r 192.168.87.0 192.168.110.255 is just another
way to write this, and it results in the same output.)
To find networks with at least 20, 63 and 30 IP addresses within a /24
network, use for example:
Address: 192.0.2.0 Netmask: 255.255.255.0 = 24 Wildcard: 0.0.0.255 => Network: 192.0.2.0/24 HostMin: 192.0.2.1 HostMax: 192.0.2.254 Broadcast: 192.0.2.255 Hosts/Net: 254 Class C 1. Requested size: 20 hosts Netmask: 255.255.255.224 = 27 Network: 192.0.2.128/27 HostMin: 192.0.2.129 HostMax: 192.0.2.158 Broadcast: 192.0.2.159 Hosts/Net: 30 Class C 2. Requested size: 63 hosts Netmask: 255.255.255.128 = 25 Network: 192.0.2.0/25 HostMin: 192.0.2.1 HostMax: 192.0.2.126 Broadcast: 192.0.2.127 Hosts/Net: 126 Class C 3. Requested size: 30 hosts Netmask: 255.255.255.224 = 27 Network: 192.0.2.160/27 HostMin: 192.0.2.161 HostMax: 192.0.2.190 Broadcast: 192.0.2.191 Hosts/Net: 30 Class C Needed size: 192 addresses. Used network: 192.0.2.0/24 Unused: 192.0.2.192/26sipcalc sipcalc is similar to ipcalc. One big difference seems to be the IPv6 support:
$ sipcalc 2001:DB8::/32
-[ipv6 : 2001:DB8::/32] - 0
[IPV6 INFO]
Expanded Address - 2001:0db8:0000:0000:0000:0000:0000:0000
Compressed address - 2001:db8::
Subnet prefix (masked) - 2001:db8:0:0:0:0:0:0/32
Address ID (masked) - 0:0:0:0:0:0:0:0/32
Prefix address - ffff:ffff:0:0:0:0:0:0
Prefix length - 32
Address type - Aggregatable Global Unicast Addresses
Network range - 2001:0db8:0000:0000:0000:0000:0000:0000 -
2001:0db8:ffff:ffff:ffff:ffff:ffff:ffff
(Thanks to Niall for the pointer to RFC3849. :-)
It can also split up networks into smaller chunks, but only same-size
chunks, like e.g. split a /32 IPv6 network into /34 networks:
sipcalc -S34 2001:DB8::/32
-[ipv6 : 2001:DB8::/32] - 0
[Split network]
Network - 2001:0db8:0000:0000:0000:0000:0000:0000 -
2001:0db8:3fff:ffff:ffff:ffff:ffff:ffff
Network - 2001:0db8:4000:0000:0000:0000:0000:0000 -
2001:0db8:7fff:ffff:ffff:ffff:ffff:ffff
Network - 2001:0db8:8000:0000:0000:0000:0000:0000 -
2001:0db8:bfff:ffff:ffff:ffff:ffff:ffff
Network - 2001:0db8:c000:0000:0000:0000:0000:0000 -
2001:0db8:ffff:ffff:ffff:ffff:ffff:ffff
-
Similar thing with IPv4:
sipcalc -s27 192.0.2.0/24 -[ipv4 : 192.0.2.0/24] - 0 [Split network] Network - 192.0.2.0 - 192.0.2.31 Network - 192.0.2.32 - 192.0.2.63 Network - 192.0.2.64 - 192.0.2.95 Network - 192.0.2.96 - 192.0.2.127 Network - 192.0.2.128 - 192.0.2.159 Network - 192.0.2.160 - 192.0.2.191 Network - 192.0.2.192 - 192.0.2.223 Network - 192.0.2.224 - 192.0.2.255sipcalc also has a show me all information mode with the -a option:
$ sipcalc -a 192.168.96.0/21
-[ipv4 : 192.168.96.0/21] - 0
[Classfull]
Host address - 192.168.96.0
Host address (decimal) - 3232260096
Host address (hex) - C0A86000
Network address - 192.168.96.0
Network class - C
Network mask - 255.255.255.0
Network mask (hex) - FFFFFF00
Broadcast address - 192.168.96.255
[CIDR]
Host address - 192.168.96.0
Host address (decimal) - 3232260096
Host address (hex) - C0A86000
Network address - 192.168.96.0
Network mask - 255.255.248.0
Network mask (bits) - 21
Network mask (hex) - FFFFF800
Broadcast address - 192.168.103.255
Cisco wildcard - 0.0.7.255
Addresses in network - 2048
Network range - 192.168.96.0 - 192.168.103.255
Usable range - 192.168.96.1 - 192.168.103.254
[Classfull bitmaps]
Network address - 11000000.10101000.01100000.00000000
Network mask - 11111111.11111111.11111111.00000000
[CIDR bitmaps]
Host address - 11000000.10101000.01100000.00000000
Network address - 11000000.10101000.01100000.00000000
Network mask - 11111111.11111111.11111000.00000000
Broadcast address - 11000000.10101000.01100111.11111111
Cisco wildcard - 00000000.00000000.00000111.11111111
Network range - 11000000.10101000.01100000.00000000 -
11000000.10101000.01100111.11111111
Usable range - 11000000.10101000.01100000.00000001 -
11000000.10101000.01100111.11111110
[Networks]
Network - 192.168.96.0 - 192.168.103.255 (current)
Thanks again to Kurt and Niall for their contributions!
Now listening to the schreimaschine and fausttanz submissions for the interactive competition at the B nzli/DemoDays in Olten (Switzerland)
As I hav ethis toy for more than week, I can share a little more information about it. Please note that some experiences are based on fact that this is my first "big" phone with touchscreen.
The big screen is great for reading. Much better than my old Nokia E52. It is also much better readable on direct sun light. The dark side of this is of course power consumption, but I think this might still get improved for production pieces.
Having Linux on the phone is nice, ssh to phone and you can do anything comfortably with real keyboard (N950's QWERTY keyboard is great, but still quite small). Having Debian based system there is even better, though I felt a bit strange when I first ran apt-get upgrade on my phone :-). Well there are some changes from standard Debian system like extented fields in debian/control for icons, but generally it feels pretty much as Debian.
There are lot of things to try on N950, you can find some hints on N950 landing page, I still need to try most of that :-).
Filed under: Debian English Meego 6 comments Flattr this!
Been hot and dry today (although the sky is now back full of
dark clouds), so I had a headache most of the morning until way
past noon. Better now though, and I found a place where I could
get Cevapi, which are really some sort of quick imbiss / fast
food here (no uve pirina though, and she didn t have any
Ajvar nor did she speak any language other than the local, but
that wasn t a problem, only a bit dry because I didn t give in
and took the offered Ketchup). Bought a 1 bottle of Kru kovac
(from Hrvatska, though) and some small plastic glasses, then.
I wonder how many people would, now, be willing to give Bosna
i Hercegovina a try as holiday region (which might have been the
intent of having a Balkan DebConf). I m sure I do.
To all attendees: the hotel will give you some kind of stamped
hardpaper card which states where you stayed on the trip, and for
how long give that to the border guards when exiting Bosnia.
Before arriving to DebConf11, I arranged my flights so that I had a day and a night in Paris as I have not been there before. So after checking out of my work apartment in Tampere, going to work there with all the things from that apartment, then flying back to Riga, going to a midnight screening of the last Potter movie and finally getting back home around 2am, I quickly checked that I have everything needed for the conference and went off to sleep only to wake up at 8am again, pack everything (into a single carry-on bag, after a year of experience travelling by air weekly and watching Up in the Air twice) and be off to the plain to Paris.
The CDG airport is quite huge, even compared to something like JFK it feels bigger and more concrete. And yet so dark and lacking interesting features that the only photo I got from it was this
I then used the B line train to get to my hotel(9.1 ), drop my stuff there and another metro ticket (1.7 ) to go to Arc de Triomphe (M tro Charles de Gaulle-Etoile), went up there and walked the length of the Champs-Elys es right up to the Louvre. Then I walked to the river, crossed it to a small island to see the Notre Dame and then went back following the other bank of the river Seine seing both some more normal non-touristy streets of central Paris and also some other magnificent buildings, like Les Invalides and ending up at the Eifel tower. It was a rather easy walk that was only spoiled by some rain in the end so I did not get to take some night photos of the Eiffel tower as I wanted.
But the experience still was breathtaking. The scale of the buildings was impressive. The pervasive gold-gilded decorations do expand on the splendour and the same time the full access to all the previously-royal places brings them down to people. The city looks well built and the planning mostly makes sense, especially if you are on foot. Car drivers might have a different opinion about it considering the maze of roads and traffic circles and underpasses I saw in central Paris.
It is often said that Riga is a mini-Paris. Mostly, that is said in Riga. But walking the back streets of Paris I can see where that comes from the architecture, the street design, the small cafes and some cobblestone roads and some historical buildings with a few modern building thrown into the mix, and a tower too. Visually Riga does look like Paris a lot, but for the feeling, I still think that Riga feels more like Berlin with its mix of eastern and western Europe.
I had one incident when some girl in front of Louvre started to ask me to sign something, gesturing to show that she was mute, it looked like a donation racket, but I did not get to find it out in detail as a swift security guard appeared and started running for the girl, who immediately took off running along with several friends. I guess the guards know them very well.
On a more positive note, in one of many confetterie shops I noticed the macaron sweets that my friend advertised loudly some time ago, so I decided to buy and try some. They cost 7 for a box of 6. The taste was very, very sweet. Basically it tastes like froffed up and then frozen sugar made into cookie form with a cream layer between two cookies.
So basically it is like an Oreo cookie, but much, much, much more tender, airy and sweet. The two of the 6 cookies were partly crushed while I tenderly carried them for 5 minutes in their box while searching for a place to sit down and eat them.
After that I also had a proper dinner in a restaurant that was not too near the touristy paths, but still it was a bit lacking. The starter was quite nice I mean it is hard to screw up cutting off a piece of foie gras (basically a piece of liver paste with a layer of extra geese fat), but the main dish was disappointing I ordered a medium rare steak. First of all it came with a side of fries, that in itself was an insult to Paris, baked potatoes would have fit much better with this dish. And despite the main part of the steak being very nicely done to medium rare, the cut was done badly and the edges of the steak had sinew that was too chewy to eat or even cut normally.
Other interesting things I liked about Paris:
* Statues some made of stone, some of iron, some covered in gold, everywhere and made with great quality
* Bicycle rentals, I mostly saw the locals using them
* Segway tourists
* And countless classic postcard shots of very recognizable architecture
The Eiffel tower was immensely impressive. It towers over everything around, especially because there simply is nothing high enough around it. It would not have been so impressive in the middle of New York, for example. The age and openness of the construction makes you really feel the massiveness of this marvel of functional architecture.
But in the end Paris also looks like a great city to just kick back and relax in
P.S. I am amazed that when I put a link to a Flickr image (such as http://www.flickr.com/photos/aigarius/5950187165/in/set-72157627230456160 in a separate paragraph in my WordPress article text, something along the way translates them into proper linked images with a reasonable size. Progress is amazing.
My previous
laptop was due for a replacement. It's not that old yet only
two years but it was getting on my nerves. The (second!) battery
only gave me 45 minutes anymore, the wireless had issues, and I never
really liked the processor note
the lack of the VT-x extension; at the time when I bought this laptop, I
wasn't aware of the fact that Intel was segmenting their products based
in processors with and without hardware virtualisation.
Originally I was going to buy a Toshiba R700-14J, but after I'd been
waiting for far too long, it turned out that it had been EOL'd. So
eventually, I succumbed to the dark side and bought me a Lenovo Thinkpad
X220 instead. I've never been a fan of thinkpads before; I don't like
what they look like, especially not the earlier models. But since I
didn't want to wait a very long time again, I decided to go
instead for a model that my suppliers' extranet site told me they had in
stock, which kindof limits your options.
The model I got is one with an SSD, which is new for me. I'd
previously been holding off on getting an SSD until the technology had
matured a bit, having heard some horror stories in the past about how
some earlier models would run very slow after a while, but I guess it's
safe to say that kind of problem should now be past us.
It's crazy how fast this SSD is. The original 5 second delay which
grub implies almost doubled the boot time. I notice that the
'networking' initscript no longer waits for a DHCP request to complete,
which has the rather funny result that sometimes when I log in, I don't
have networking yet, which means that libpam-krb5 can't do it's job
properly, yet.
There's one thing I'm not very fond of, and that's the display aspect
ratio. 16:9 is just wrong. While I still prefer 4:3, I can live
with 16:10. Very unhappy about that. There are still some laptops
available that do have 16:10, but that would've required me to wait,
which I didn't want to do anymore...
Oh well.
I have bought a Samsung Galaxy S Android phone some time
ago. One of the first thing that you try to do with such a phone is to
switch to some alternate firmware (the coined term is ROM ), like
CyanogenMod. Flashing a firmware is a whole new universe. You
are told about a lot of proprietary tools, you need to download a lot
of things from MegaUpload and friends and nobody really explains
what s going on under the hood. I was a bit lost at first.
I will not provide a step-by-step guide since I cannot afford to stay
up-to-date. Such a guide is usually posted on some forum. It assumes
you are running Windows and provides appropriate download links. You
must follow it (and check that it is recent enough). I will just
provide you some background to understand those guides.
$ git clone https://github.com/Benjamin-Dobell/Heimdall.git Cloning into Heimdall... remote: Counting objects: 423, done. remote: Compressing objects: 100% (271/271), done. remote: Total 423 (delta 220), reused 332 (delta 138) Receiving objects: 100% (423/423), 5.91 MiB 962 KiB/s, done. Resolving deltas: 100% (220/220), done. $ cd Heimdall/heimdall $ sudo apt-get install libusb-1.0-0-dev $ ./configure && make [...] $ sudo cp 60-heimdall-galaxy-s.rules /etc/udev/rules.d $ sudo /etc/init.d/udev reload
$ ./heimdall print-pit
IBL+PBL is the boot loader, be extra careful with it;PIT is the partition table;EFS contains some important data like IEMEI, be extra careful with it;SBL is the second boot loader;SBL2 is the backup of the second boot loader;PARAM contains some images used as various stage of the boot process;KERNEL is the kernel;RECOVERY is the backup of the kernel;FACTORYFS contains /system file system which is some kind of
root file system;DBDATA contains /data file system which is the database to
store application parameters;CACHE contains /cache file system which contains the Dalvik cache;MODEM contains the firmware for the modem.flash subcommand.
$ tar zxvf ~/download/android-sdk_r11-linux_x86.tgz $ cd android-sdk-linux_x86 $ tools/android update sdk [select Android SDK Platform-tools] $ platform-tools/adb shell # uname -a Linux localhost 2.6.35.7-I9000XWJVH-CL184813 #Dark_Core_2.4 PREEMPT Mon May 16 15:02:38 EEST 2011 armv7l GNU/Linux
shell to get a shell on the device;reboot recovery to reboot in recovery mode;reboot download to reboot in download mode;push to put a file on the phone;pull to retrieve a file;install to install an application from its APK;logcat to see the logs and what happens, very useful!adb and heimdall. You need to grab
some official firmware and extract boot.bin and
Sbl.bin from it.
$ adb reboot download $ heimdall flash --primary-boot ~/download/boot.bin --secondary-boot ~/download/Sbl.bin
$ ./heimdall flash --repartition --pit s1_odin_20100512.pit \ > --factoryfs factoryfs.rfs \ > --cache cache.rfs --dbdata dbdata.rfs \ > --param param.lfs --modem modem.bin \ > --kernel zImage --secondary-boot Sbl.bin Claiming interface again... Success Setting up interface... Success Beginning session... Handshaking with Loke... Success Uploading PIT PIT upload successful Uploading SBL 100% SBL upload successful Uploading KERNEL 100% KERNEL upload successful Uploading MODEM 100% MODEM upload successful Uploading PARAM 100% PARAM upload successful Uploading FACTORYFS 100% FACTORYFS upload successful Uploading DBDATAFS 100% DBDATAFS upload successful Uploading CACHE 100% CACHE upload successful Ending session... Rebooting device...
I have bought a Samsung Galaxy S Android phone some time
ago. One of the first thing that you try to do with such a phone is to
switch to some alternate firmware (the coined term is ROM ), like
CyanogenMod. Flashing a firmware is a whole new universe. You
are told about a lot of proprietary tools, you need to download a lot
of things from MegaUpload and friends and nobody really explains
what s going on under the hood. I was a bit lost at first.
I will not provide a step-by-step guide since I cannot afford to stay
up-to-date. Such a guide is usually posted on some forum. It assumes
you are running Windows and provides appropriate download links. You
must follow it (and check that it is recent enough). I will just
provide you some background to understand those guides.
$ git clone https://github.com/Benjamin-Dobell/Heimdall.git Cloning into Heimdall... remote: Counting objects: 423, done. remote: Compressing objects: 100% (271/271), done. remote: Total 423 (delta 220), reused 332 (delta 138) Receiving objects: 100% (423/423), 5.91 MiB 962 KiB/s, done. Resolving deltas: 100% (220/220), done. $ cd Heimdall/heimdall $ sudo apt-get install libusb-1.0-0-dev $ ./configure && make [...] $ sudo cp 60-heimdall-galaxy-s.rules /etc/udev/rules.d $ sudo /etc/init.d/udev reload
$ ./heimdall print-pit
IBL+PBL is the boot loader, be extra careful with it;PIT is the partition table;EFS contains some important data like IEMEI, be extra careful with it;SBL is the second boot loader;SBL2 is the backup of the second boot loader;PARAM contains some images used as various stage of the boot process;KERNEL is the kernel;RECOVERY is the backup of the kernel;FACTORYFS contains /system file system which is some kind of
root file system;DBDATA contains /data file system which is the database to
store application parameters;CACHE contains /cache file system which contains the Dalvik cache;MODEM contains the firmware for the modem.flash subcommand.
$ tar zxvf ~/download/android-sdk_r11-linux_x86.tgz $ cd android-sdk-linux_x86 $ tools/android update sdk [select Android SDK Platform-tools] $ platform-tools/adb shell # uname -a Linux localhost 2.6.35.7-I9000XWJVH-CL184813 #Dark_Core_2.4 PREEMPT Mon May 16 15:02:38 EEST 2011 armv7l GNU/Linux
shell to get a shell on the device;reboot recovery to reboot in recovery mode;reboot download to reboot in download mode;push to put a file on the phone;pull to retrieve a file;install to install an application from its APK;logcat to see the logs and what happens, very useful!adb and heimdall. You need to grab
some official firmware and extract boot.bin and
Sbl.bin from it.
$ adb reboot download $ heimdall flash --primary-boot ~/download/boot.bin --secondary-boot ~/download/Sbl.bin
$ ./heimdall flash --repartition --pit s1_odin_20100512.pit \ > --factoryfs factoryfs.rfs \ > --cache cache.rfs --dbdata dbdata.rfs \ > --param param.lfs --modem modem.bin \ > --kernel zImage --secondary-boot Sbl.bin Claiming interface again... Success Setting up interface... Success Beginning session... Handshaking with Loke... Success Uploading PIT PIT upload successful Uploading SBL 100% SBL upload successful Uploading KERNEL 100% KERNEL upload successful Uploading MODEM 100% MODEM upload successful Uploading PARAM 100% PARAM upload successful Uploading FACTORYFS 100% FACTORYFS upload successful Uploading DBDATAFS 100% DBDATAFS upload successful Uploading CACHE 100% CACHE upload successful Ending session... Rebooting device...
Given that I was responsible for putting together the system
architecture for Github when they
moved away from their previous services provider to Anchor Systems, I keep an eye
on what's going on there even though I've gotten out of professional
IT.
Recently(ish), Ryan Tomayko blogged about some experiments
in using Amazon CloudFront as a CDN for static assets. While
discussing as-yet unsolved performance issues, he quoted a tweet from
Shopify's CEO (who I would have thought would have known better):
Protip to make SSL fast: terminate in your load balancer, that makes SSL session cookies actually work.No, no, NO -- a million times NOOOOOO! Load balancers are, by their very nature, performance chokepoints. You can't horizontally scale your load balancer, because if you do (by, say, putting another load balancer in front of it -- don't laugh, I've seen it done) you've just re-introduced all the same problems that putting SSL on the load balancer was supposed to accomplish (that is, getting SSL session caching to work). The only thing you accomplish by putting your SSL sessions onto the load balancer is bring the moment your load balancer melts down through excessive CPU usage that much closer. I dunno, maybe Shopify doesn't actually do that much traffic or something, but I certainly wouldn't be signing up for that headache if it were my infrastructure. (Sidenote: yes, I know that you can get "SSL hardware accelerators", that put the basic crypto operations into dedicated silicon, but they're rarely cheap, and you can't horizontally scale those, either. They're effectively a specialised and outrageously expensive form of "scaling by bigger hardware" -- which is a valid method of scaling, but one with fairly terminal limitations that certainly wouldn't make it practical for Github). The problem you're trying to solve by centralising SSL operations is that SSL includes a mechanism whereby a client making a new TCP connection can say "here's the crypto details from last time I connected to you" and the server can just pull out all of the per-connection data that would otherwise take a long time (several TCP round trips and a smallish chunk of CPU time) to setup. This can make SSL connections a lot snappier (in Ryan's opinion, "We spend roughly as much time handshaking as we do generating the average dynamic request."), so they're a definite win if you can do it (and yes, you can do it). Webservers don't typically do this caching by default, but setting up a simple SSL session cache for a single nginx or Apache webserver is pretty trivial. Testing it is simple, too: just install gnutls-bin and run:
gnutls-cli -V -r HOSTNAME grep 'Session ID'If all three Session IDs are the same, then you've got SSL session caching running. (If you're wondering why I'm using gnutls-cli rather than openssl s_client, it's because openssl is living in the pre-IPv6 dark ages, and I've got IPv6-only services running I wanted to test). So that's great for your little single-server hosting setup, but per-machine caches aren't much use when you're running behind a load balancer, Github style, because each SSL-enabled TCP connection can very well end up on a different server, and a per-machine cache won't help you very much. (If you think the answer to this problem is "session affinity", you're setting yourself up for a whole other world of pain and suffering.) Here's the kicker, though -- the SSL session is just a small, opaque chunk of bytes (OpenSSL appears to store it internally as an ASN.1 string, but that's an irrelevant implementation detail). An SSL session cache is just a mapping of the SSL session ID (a string) to the SSL session data (another string). We know how to do "shared key-value caches" -- we have the technology. There won't be too many large-scale sites out there that aren't using memcached (or something practically equivalent). So, rather than stuff around trying to run a load balancer with enough grunt to handle all your SSL communication for all time, you can continue to horizontally scale the whole site with as many backend webservers as you need. All that's needed is to teach your SSL-using server to talk to a shared key-value cache. Far be it for me to claim any sort of originality in this idea, though -- patches for Apache's mod_ssl to do this have been floating around for a while, and according to the release notes, the 2.4 series will have it all built-in. However, Github uses nginx, to great effect, and nobody's done the work to put this feature into nginx (that I could find, anyway). Until now. I present, for the edification of all, a series of patches to nginx 0.8.x to provide memcached-enabled SSL session caching. Porting them to other versions of nginx hopefully won't be too arduous, and if you ask nicely I might give it a shot. If you don't use memcached (gasp!), my work should at least be a template to allow you to hook into whatever system you prefer. Sharding the memcached calls wouldn't be hard either, but I'm not a huge fan of that when other options are available. I had originally hoped to be able to say "it works at Github!" as a testimonial, but for some reason it hasn't been deployed there yet (go forth and pester!), so instead I'm just releasing it out there for people to try out on a "well, I don't know that it doesn't work" basis. If it breaks anything, it's not my fault; feel free to supply patches if you want to fix anything I've missed.
Given that I was responsible for putting together the system
architecture for Github when they
moved away from their previous services provider to Anchor Systems, I keep an eye
on what's going on there even though I've gotten out of professional
IT.
Recently(ish), Ryan Tomayko blogged about some experiments
in using Amazon CloudFront as a CDN for static assets. While
discussing as-yet unsolved performance issues, he quoted a tweet from
Shopify's CEO (who I would have thought would have known better):
Protip to make SSL fast: terminate in your load balancer, that makes SSL session cookies actually work.No, no, NO -- a million times NOOOOOO! Load balancers are, by their very nature, performance chokepoints. You can't horizontally scale your load balancer, because if you do (by, say, putting another load balancer in front of it -- don't laugh, I've seen it done) you've just re-introduced all the same problems that putting SSL on the load balancer was supposed to accomplish (that is, getting SSL session caching to work). The only thing you accomplish by putting your SSL sessions onto the load balancer is bring the moment your load balancer melts down through excessive CPU usage that much closer. I dunno, maybe Shopify doesn't actually do that much traffic or something, but I certainly wouldn't be signing up for that headache if it were my infrastructure. (Sidenote: yes, I know that you can get "SSL hardware accelerators", that put the basic crypto operations into dedicated silicon, but they're rarely cheap, and you can't horizontally scale those, either. They're effectively a specialised and outrageously expensive form of "scaling by bigger hardware" -- which is a valid method of scaling, but one with fairly terminal limitations that certainly wouldn't make it practical for Github). The problem you're trying to solve by centralising SSL operations is that SSL includes a mechanism whereby a client making a new TCP connection can say "here's the crypto details from last time I connected to you" and the server can just pull out all of the per-connection data that would otherwise take a long time (several TCP round trips and a smallish chunk of CPU time) to setup. This can make SSL connections a lot snappier (in Ryan's opinion, "We spend roughly as much time handshaking as we do generating the average dynamic request."), so they're a definite win if you can do it (and yes, you can do it). Webservers don't typically do this caching by default, but setting up a simple SSL session cache for a single nginx or Apache webserver is pretty trivial. Testing it is simple, too: just install gnutls-bin and run:
gnutls-cli -V -r HOSTNAME grep 'Session ID'If all three Session IDs are the same, then you've got SSL session caching running. (If you're wondering why I'm using gnutls-cli rather than openssl s_client, it's because openssl is living in the pre-IPv6 dark ages, and I've got IPv6-only services running I wanted to test). So that's great for your little single-server hosting setup, but per-machine caches aren't much use when you're running behind a load balancer, Github style, because each SSL-enabled TCP connection can very well end up on a different server, and a per-machine cache won't help you very much. (If you think the answer to this problem is "session affinity", you're setting yourself up for a whole other world of pain and suffering.) Here's the kicker, though -- the SSL session is just a small, opaque chunk of bytes (OpenSSL appears to store it internally as an ASN.1 string, but that's an irrelevant implementation detail). An SSL session cache is just a mapping of the SSL session ID (a string) to the SSL session data (another string). We know how to do "shared key-value caches" -- we have the technology. There won't be too many large-scale sites out there that aren't using memcached (or something practically equivalent). So, rather than stuff around trying to run a load balancer with enough grunt to handle all your SSL communication for all time, you can continue to horizontally scale the whole site with as many backend webservers as you need. All that's needed is to teach your SSL-using server to talk to a shared key-value cache. Far be it for me to claim any sort of originality in this idea, though -- patches for Apache's mod_ssl to do this have been floating around for a while, and according to the release notes, the 2.4 series will have it all built-in. However, Github uses nginx, to great effect, and nobody's done the work to put this feature into nginx (that I could find, anyway). Until now. I present, for the edification of all, a series of patches to nginx 0.8.x to provide memcached-enabled SSL session caching. Porting them to other versions of nginx hopefully won't be too arduous, and if you ask nicely I might give it a shot. If you don't use memcached (gasp!), my work should at least be a template to allow you to hook into whatever system you prefer. Sharding the memcached calls wouldn't be hard either, but I'm not a huge fan of that when other options are available. I had originally hoped to be able to say "it works at Github!" as a testimonial, but for some reason it hasn't been deployed there yet (go forth and pester!), so instead I'm just releasing it out there for people to try out on a "well, I don't know that it doesn't work" basis. If it breaks anything, it's not my fault; feel free to supply patches if you want to fix anything I've missed.
Excuse me in advance for any typos. itting in a dark room and posting with a Kindle has its down sides.
I have been participating for about 1.5 years on a seminar about the copyright in the ediyorial ambit. This year, the focus is on digital media.
Today the first speaker is Dr. Kyoshi Tsuru, General Director of BSA Mexico. He is talking about the beauties and advantages of DRM and TPM. It was interesting to hear how he began by saying how people are afraid of nice, good, protective measures and call it with derogatoey, morally charged ways:Specifically about "self-utelage"measures. It is interesting t hear him in the role I often speak eg. by repeating that piracy is a derogatory,morally charged term for "making illegal copies"
Fun to hear how he defends that mainly academicians are disconnected from the real world...
Haven't been in my new home that long and through a long chain of contacts, my neighbour was finally able to contact me. (Just goes to show that having Debian friends nearby who like board games turns out to make some things JustWork.)Next.