My name is Tobias and I've always messed or had something going on with computers. I use the majority of my time with computers; mostly invested in programming and trying out new ideas. This site functions as a personal hideout and as a place where I present some of my projects.
Compact SSD with Arch and GRUB
16/10/2016 Filed in: News
I've been using a compact SSD USB-stick for some years now. My trusty Kingston DataTraveller. A beasty performer considering it's a glorified USB-stick. It contains a SSD controller with the flash chips so it functions just like a normal SSD. It gives me about 40-50MB/s read/write speeds. Decent for my needs.
Recently I formatted the stick and started afresh. This post gives a quick rundown of what I did to restore its glory.
First of I made a copy of my main install from my internal SSD;
$ mount /dev/sdb1 /mnt/kingston $ cp -axr / /mnt/kingston $ cp -axr /home /mnt/kingston
Remember to use -x to only copy from the locale mount and not other mounted filesystems. -a for archive; preserving attributes, recursive and no de-referencing.
Sometimes you get this gnarly error when trying to install GRUB;
Installing for i386-pc platform. grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels. This is not supported yet.. grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. grub-install: error: will not proceed with blocklists.
Therefore next clear what could be left of GPT or similar on the USB-stick. Making room for GRUB and insuring grub-install works its wonders.
$ parted /dev/sdb $ mkpart primary ext4 0MiB 1MiB $ quit
Then, zero the newly created partition.
$ dd if=/dev/zero of=/dev/sdb2
Then, delete the partition.
$ parted /dev/sdb $ rm 2 $ quit
grub-install should now be able to do what it does.
$ grub-install target=i386-pc /dev/sdb $ grub-mkconfig -o /mnt/kingston/boot/grub/grub.cfg
Verify the generated grub.cfg. And voilá. We're done. You should be able to boot from the USB-stick now. Remember to use the UUID of the sdb1 partiton in your /etc/fstab on the USB-stick to avoid problems.
Kotori your friend!
22/9/2016 Filed in: News
Some years ago I released the "Kotori Live Wallpaper" on Google Play. At the time called Android Market. The idea behind Kotori was to treat your background on your Android phone with a little Tamagotchi experience. Kotori is a little bird that "lives" on your phone. You need to feed and bath Kotori. Kotori in turn gives you small quotes and ideas; in the form of text on screen. Simulating that Kotori is aware of you and your phone. Your phone is low on battery? Sure enough Kotori will let you know. All kinds of reactions to the behaviors of your phone.
It had its success. First launched as a paid app, later a free version came. All-in-all Kotori Live Wallpaper achieved ~100.000 installs. Paid 5% and 95% for the free version.
Now I have almost finished a new implementation. The old version was implemented using the Canvas-class and bitmap manipulation. It was a very slow rendering method. Not accelerated by a GPU. Rendered at 1 FPS. Similar to the original Tamagochi experience. The new implementation uses libGDX for the drawing and rendering part. With libGDX all rendering is done wrapped through OpenGL ES 2.0. This means GPU-acceleration. Currently this new version as no limit on FPS rendered. This gives a smoother experience. Sprite animations are used for the different animations of Kotori. All the sprites are reused from the old implementation. These were all handdrawn on paper with a graphite pencil and then scanned digitally.
The core logic of Kotori is represented in something very similar to a finite state machine. Kotori lives its life in states. Even if you have your device turned off Kotori will still live on. When you turn your device screen off a timestamp is persisted. When you turn on your device again the difference in time is calculated and added to the simulation. Thus the life of Kotori continues even when your device is off in some sense.
The new version is scheduled to launch the 25th of September on Google Play. There is a trial period of 24 hours. Hereafter you can unlock with a payment of .75 dollars. I'm using the In-app Billing service on Android from Google. This is a first for me using this service. We'll see how it goes. To make things even simpler I'm using this wrapper; https://github.com/anjlab/android-inapp-billing-v3. I discovered some inconsistencies with documentation on how to test In-app Billing. Google provides some SKUs that will return some static responses. These SKUs provided by Google will not have a valid signature though. The opposit is stated in the documentation. This means you can't actually see a purchase the whole way through.
I really like libGDX. Everything is wrapped intelligently and the documentation is pretty up-front. Some inconsistency but that is always expected in some form. What I really like about libGDX is that it makes it possible to target other platforms without much tailoring. I'm not sure Kotori will see other platforms though. The experience is too centered around the Android device.
I invite you to try out the new version of Kotori. Hopefully it can bring you some smiles. If you like the idea behind the Tamagotchi I think you'll find Kotori to be a fun little exprience. Please try out Kotori your friend! on Google Play! Have fun!
Promo codes for full unlock (use these during in-app purchase);
KTWX85G61102K3W20CUHNQE 052GDAKRKDVNSN0LQCFVCTW 79TUVFR73A9CUWS8RVCEA2X U5U4Q84JGH2Z6H28P79F5C9 LCB12RVGFHM2J5RC74L6KUZ ATWZNM1THH4XX5UM9P04K8G Y5H1RSQK0741HS2EG8B502K
i3 tilling window manager; worthwhile additions
26/3/2016 Filed in: News
Here is a couple of extra bits to improve your i3 experience. I use these additions myself.
rofi; https://davedavenport.github.io/rofi/ . I've been using rofi as an alternative to dmenu for about a year now. I love it!
If you're not familiar with dmenu. dmenu is a keyboard-driven menu utility developed as part of the dwm project. When invoked, usually by a user-configured key combination, dmenu displays a horizontal menu of its stdin stream at the top edge of the screen. It works but feels old. rofi is an alternative with some nice extras. It includes a window-switcher. This lets you search and change windows with ease. It is also easier to customize; both visually and functionally.
The bottom bit is rofi.
i3blocks; https://github.com/vivien/i3blocks. i3blocks is a highly flexible status line for the i3 window manager. It handles clicks, signals and language-agnosticuser scripts. In other words it makes it super convenient to customize your i3bar.
The top bit is i3blocks.
1. Foo Fighters - The Neverending Sigh2. Foo Fighters - Iron Rooster3. Foo Fighters - Savior Breath4. Foo Fighters - Sean5. Foo Fighters - Saint Cecilia6. Fear of Tigers - What Did I Do?7. Fear of Tigers - Please Don't Leave8. Foo Fighters - Generator9. Foo Fighters - Gimme Stitches10. Foo Fighters - Learn to Fly
I love taking photographs. Here you can see my latest snaps. More photos...
Interwebs and me
You can read my professional qualifications on the about page.
I'm present at these sites;