Converted old blog entries

This commit is contained in:
Felipe M 2016-12-16 00:38:04 +01:00
parent edb5816892
commit 7aecdaf367
83 changed files with 2445 additions and 36 deletions

View file

@ -0,0 +1,45 @@
title: Amazon S3 bucket public read policy
---
body:
After migrating the blog to a PaaS service I had a proble that the disk space
was volatile and I had to store the images and binary files on another server
or CDN. After thinking for a while I decied to give a try to amazon S3.
Created a bucket that I'm going to use as CDN for now on, but geeking around I
saw that the permissions are modified by file, not by folder/bucket. Searching
aroung the docs I found the policies, that are JSON strings wich include
properties for the entire bucket.
For making a read-only public bucket you need this:
``` js
{
"Version": "2008-10-17",
"Statement": [{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": ["s3:GetObject"],
"Resource": ["arn:aws:s3:::/*"]
}]
}
```
Replace <bucket name> for yours and apply changes. With this the entire
bucket will be publicy accesible, but if you want to be more restrictive, you
may specify a subfolder:
``` js
"Resource": ["arn:aws:s3:::<bucket>/<path>/*"]
```
Hope this helps.
---
pub_date: 2012-11-23
---
_template: blog/post.html

View file

@ -0,0 +1,60 @@
title: HowTo: OS X screenshots without shadows
---
body:
The beautiful shadows that OS X brings to screenshots are good in some ways or
depending the purpose of the screenshot itself. But for other things are a
pain in the ass.
After some research I've found multiple ways to get rid of that shadows
## 1) The default setting
Since the terminal command allows you to deactivate the shadow I assumed that
there could be some `defaults` option for the same purpose. And it is!
With this two commands you can use the normal keybinds to do _shadowless_
screenshots:
`defaults write com.apple.screencapture disable-shadow -bool true killall SystemUIServer`
To revert to the original status:
```
defaults write com.apple.screencapture disable-shadow -bool false killall SystemUIServer
```
## 2) The Grab utility
Open the Grab.app: `Applications > Utilities > Grab`, and under the `Capture`
menu you will find the `Window` option.
You can also use the `SHIFT`+`CMD`+`W` keybind -while Grab.app is focused-.
## 3) The terminal way
OS X provides us with the `screencapture` command, so we can hack around and
build our own scripts. A simple one that allows interactive capture without
shadow:
```
screencapture -i -o filename.png
```
A more complete one that saves the screenshot on the desktop with the datetime
as filename:
```
screencapture -i -o ~/Desktop/screenshot_`date +%Y%m%d_%H%M%S`.png
```
These are some ways I found. You can play around and make your own bash or
Automator scripts and improve it to your needs.
Hope this helps!
---
pub_date: 2012-12-20
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

View file

@ -0,0 +1,74 @@
title: My SublimeText 2 workspace
---
body:
## Package Control
Essential. Install this and forget about downloading files, updating, … Choose
to use or not every other plugin, but this one is mandatory. Just install it.
## Soda theme
The best theme I've seen for SublimeText. It's really clean and elegant. Don't
forget to use it's custom colors too!
!["Soda
theme"](SodaTheme.png)
## SublimeLinter
Highlight potential errors using _lint_ programs so you can keep your code
clean.
!["Example of
SublimeLinter"](SublimeLinter.png)
## SublimeCode Intel
Helps with autocomplete, allows _jump-to_ and displays information of the
highlighted function on the status bar.
!["Example of SublimeCode
Intel"](SublimeCodeIntel.png)
## SublimeRope [**Python only!**]
Add a lot of IDE-like features to python developers thanks to the rope
library.
!["Example of
SublimeRope"](SublimeRope.png)
## Git &amp; GitGutter
The first one is a tool to integrate git commands onto the command palette,
the second one inserts an icon in the gutter area whether a line has been
modified, added or removed.
!["Example of
GitGutter"](GitGutter.png)
## SideBarEnchancements
Add tons of functions to the sidebar contextual menu!
!["SidebarEnhancements contextual
menu"](SidebarEnhancements.png)
## AdvancedNewFile
This is the best. Create a new file just with a key combination, no popups, no
nothing. Just press `CMD`+`ALT`+`N`, write the full path -relative to your
project path- of the file you want to create and press enter.
!["Example of
AdvancedNewFile"](AdvancedNewFile.png)
I use some other plugins, but this is my top. Do you use other really good
plugins not listed here? Tell me!
---
pub_date: 2012-12-21
---
_template: blog/post.html

View file

@ -0,0 +1,31 @@
title: 2013
---
body:
According to the Gregorian calendar, a new year is coming.
I'm not gonna waste my time -nor yours- making promises, wishing things and
all that crappy stuff. 2012 has been good and bad, I want 2013 to stay that
way, but I will keep that to me and I'm going to expose what I've thought
about the blog and what I want to do with it during 2013.
* First of all, the **#AppSunday** thing: doing it. I've missed the last two because of the date and also I wasn't really in the mood to write a word either. I really want to do it, so I will keep writing a Sunday post about apps and stuff as long as I've something about to write.
* As for _new technologies_, the reason I do not write too much about developing is because I do not think I'm a good programmer. I can't think I'm either good nor bad for something I **love**. I develop just because I enjoy it, as I've the bless that it's also my job. But after a lot of thinking, I'm going to post some micro-entries about new things I'm using -that could be things you already know long time ago- like PaaS services, libraries and stuff in general. I've a draft about _how to copy a mysql record with one SQL statement_, for example. If people like the posts as I like writing them, I will keep on with it.
* Also, this last year has been really… complete? I've started a lot of new projects -I really mean it, a lot of things whisper around my mind and some of it already have drafts and time invested on them-, so I've thought writing about its evolution. I don't know if I will make individual posts of each project or a weekly summary of all of them -or at least the ones I've worked that week-, but I want to share experiences, problems, solutions, technologies, _code_… with you.
* I still don't know if I will write personal experiences/opinion posts. I assumed that I will decide it when the time comes.
* There won't be a "What I've done in the last six months" post anymore. The one that is already in the blog will be purged when the translation is completed.
Now, get off the screen, eat a lot and get drunk. Today is the day.
Happy new year!
---
pub_date: 2012-12-31
---
_template: blog/post.html

View file

@ -0,0 +1,118 @@
title: Weekly project status: Dropping projects is hard
---
body:
![](weekly-project-status-banner.jpg)
Since I wrote [the last post of
2012](http://fmartingr.com/blog/2012/12/31/2013/) I have been wondering if I
could finish -or at least, work- on all the projects or experiments I wanted
to. The answer was easy: **no**. I just don't have enough time for all the
stuff I want to do, so I have made some decisions about my projects.
## Project _herobrine_ **_…dropped!_**
!["Early draft of Project
Herobrine"](minecraft-database.png)
The first time I did something about this project was like 2010, as some of
you have guessed by the name of the project, its minecraft related. It was
intended to be a _wowhead-like_ minecraft database but not only on PC.
Some features I wanted:
* Developed with django, returning json objects to the client.
* Client MVC based with BackboneJS
* Responsive design -so you can check with your tablet while play on your computer-
* "no refresh" -backbone-
* WebGL/Canvas block rendering
* JS Redstone circuit maker
* JS Dye maker
* Homepage with random background featuring user's screenshots (above)
* Interactive crafting/brewing/…
Finally I have to say goodbye to this _jewel_ -and it's really hard because I
love minecraft and I wanted this to happen- because of various reasons:
[minecraftwiki](http://minecraftwiki.net/) already contains a lot of
information -and it's really crowded-, the barrier of contents -I have to type
in all the minecraft items, blocks, biomes, etc- and that this wasn't really a
technical challenge -actually, some things are, but most of it are just
database relations and stuff-.
I want to prepare a future post with all the work I made on this project.
There's not much code but a lot of drafts and ideas that could help someone.
## Project _Serenity_ **_…dropped!_**
This was intended to be a way to simplify my jenkins business. Since I need a
lot of tasks like: compile, minify, copy, deploy, upload, test… I wanted an
app so I just define everything I need on a _YAML_ file and call the app with
`serenity <task>`.
I have some drafts built, a base YAML file, and some features planned like
integrated tasks, custom tasks in the YAML file, configuration…
Haven't coded for this one yet, but fortunately I heard about
[grunt](http://gruntjs.com/) who may be something very close at what I wanted
this one to be.
## ZombiePress ([github](http://github.com/fmartingr/zombiepress/))
**_…dropped!_**
It's obvious. I was making my own blog software but since now I'm a proud
octopress user this is no longer needed. I will keep the repo online just for
making me feel nostalgic in the future.
## BlueBird **_…dropped!_**
For all the iPad users… remember when Twitter changed the UI of the app? Did
you remember the old one? I do. The new interface is **total crap**, the other
was simply brilliant, and for me it was near the best one for an iOS app. I
was hoping to get a clone working in javascript, but my knowledge of touch
screens is not that good, I need to study more on the matter and then**maybe**
I will try again, but I'm pretty sure some javascript guru will do something
before that happens.
## Project _Amaranth_
The bigger brother. Recently I started a Vampire: Dark Age game with some
friends and it remembered me to when I played rolegames over IRC. I started
thinking that a online interface for roleplaying will be nice to have, because
you can also use it in a live session to whisper, draw, etc. The brainstorm
started quick enough for me to consider making it.
## Project _RTC_
Just born! -yesterday :P-. I want to make some kind of webRTC site to have
conversations without the need of register, just create a conversation, get a
link and you are set. It's more an experiment than a project itself.
## Uvepe8 ([github](http://github.com/fmartingr/uvepe8/))
I'm very proud -in a useful way- of this one and of course I'm maintaining it.
For the ones who don't know, its sort of _video-to-html5-canvas_, a mix
between apple's and sublime text's, but mines support transparency -I needed
it-.
There are some features I want to implement shown on the README file and a
full code review.
## Dharma ([github](http://github.com/fmartingr/dharma/))
An application to check for 404 links on websites, a lot of things could be
added to this, but for now is for playing around with threading, gevent and
that kind of things.
I have some _other things_ in mind I want to try, but that deserves another
post -which is already in the works-.
Stay tuned for more updates, and as always, anything you want to say: comment,
tweet, mail or shout at me!
---
pub_date: 2013-01-12
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -0,0 +1,66 @@
title: Tweeria: The MMORPG people without time can play
---
body:
!["Tweeria
summary"](header.png)
Many of us -or maybe not, but let's assume that- have played at least one
_MMORPG_ game in our life and we know that it could be _very_ time consuming.
Level up, going to instances, getting better year… and if you was _hardcore_
enough: scheduled raids.
As we grow up we notice that the time for this kind of things fade away, but
you still want to party with friends and get some_purples_. Until I found
**Tweeria**, that **brilliant idea** of using your twitter posts to interact
with your _alter-ego_ on a MMORPG world.
!["My
profile"](profile.png)
It shares some of the features of common MMORPGs but the good part is that
**we don't need to do anything else that _tweet_**for many of them, so your
character makes an action for every tweet you post -I think it's not every
tweet, just a few in a period of time, haven't checked it-. You can defeat
_NPCs_, loot an item, going onto a dungeon alone… you can even save -or kill
:P- your friends if you mention or _retweet_ them in your tweets.
!["Upcoming and in-progress
raids"](events.png)
However, there are some things that needs user interaction: the raids. You can
have up to five scheduled raids at the same time but you need to join for it
manually. However, it's fast and easy: you just need to get into the events
page and join the event you want. For gear swapping, selling items and buying
spells you need to interact on the site too. According to the posts you can
craft items and spells but that part of the game does not work for me, so I
don't know how it works.
!["Some tweeria stats
windows"](stats.png)
Another thing you can do to interact with your character is using spells. For
that, you need to buy on the market first, and when you have them equipped,
you can cast one by tweeting `!<spell shortcut>` on a given tweet, the game
will use it_automagically_.
Oh, did I mention that also have **achievements**?
!["The beautiful
map"](map.png)
As I've said, it surprised me how the most basic idea can be developed into a
very enjoyable game. Unlike _ogame_, _travian_, and its brothers, you don't
need to check the site every minute.
But to be honest… I tweet more often since I play _Tweeria_.
If you want to check it out [follow this link and join the world of
tweeria](http://tweeria.com/registration?fmartingr). You'll help me getting an
achievement! :D
---
pub_date: 2013-01-14
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View file

@ -0,0 +1,33 @@
title: Manga Recommendation: Kamisama no Iutoori (Fujimura Akeji)
---
body:
!["Kamisama no Iutoori \(FUJIMURA
Akeji\)"](kamisama-no-
iutoori.jpg)
### Summary
Takahata Shun's day at high school begins just as normal and boring as ever,
but it doesn't end that way. After his teacher's head explodes, he and his
classmates find themselves forced to play children's games, such as Daruma ga
Koronda (a game like Red Light/Green Light), with deadly stakes. With no idea
who is behind this mysterious deadly game session, and no way of knowing when
it will finally end, the only thing Shun and other students can do is keep
trying to win…
**Volumes**: 5
**Chapters**: 21 (finished)
**Genre**: Action, Horror, School, Shonen, Supernatural
**Story**: Muneyuki Kaneshiro
**Art**: Akeji Fujimura
Thanks to [@rsanchezbalo](http://twitter.com/rsanchezbalo) for his
recommendation!
---
pub_date: 2013-01-20
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View file

@ -0,0 +1,25 @@
title: Manga recommendation: Psyren
---
body:
!["Psyren"](psyren-cover.png)
### Summary
Psyren follows the adventures of Ageha Yoshina, a high school student who is
chosen by Nemesis Q as a participant in the Psyren games. The games take place
in a world known initially as Psyren, which is revealed to be the real world a
decade in the future. Ageha and his friends attempt to alter the future and
save the world from becoming Psyren.
**Volumes**: 16
**Chapters**: 145 (finished)
**Genre**: Action, Adventure, Game, Romance, Sci-Fi, Shounen, Super Power, Supernatural, Psychological
**Story/Art**: Tokashi Iwashiro
---
pub_date: 2013-02-23
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

View file

@ -0,0 +1,303 @@
title: Where to buy Warcraft books ordered by storyline
---
body:
I've reunited a list with all the warcraft books sorted by the storyline of
the lore. Some of 'em occur at the same time so if you see the same book twice
that's the reason.
More info on [WowWiki](http://www.wowwiki.com/Story_guide).
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Book name</th>
<th>Amazon COM</th>
<th>Amazon UK</th>
<th>Kindle</th>
<th>BookDepository</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Pre-game timeline events</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>The war of the ancients Trilogy</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>- The Well of Eternity</td>
<td><a href="http://www.amazon.com/The-Well-Eternity-WarCraft-Ancients/dp/0743471199/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Well-Eternity-Bk-Ancients/dp/0743471199/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/Warcraft-Ancients-Well-Eternity-ebook/dp/B000FC1LP6/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Well-Eternity-Bk-1-Richard-Knaak/9780743471190">BookDepository</a></td>
</tr>
<tr>
<td>- The Demon Soul</td>
<td><a href="http://www.amazon.com/Demon-Soul-Warcraft-Ancients-Book/dp/0743471202/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Demon-Soul-Bk-Ancients/dp/0743471202/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/Warcraft-Ancients-Demon-Soul-ebook/dp/B000QBYENC/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Demon-Soul-Bk-2-Richard-Knaak/9780743471206">BookDepository</a></td>
</tr>
<tr>
<td>- The Sundering</td>
<td><a href="http://www.amazon.com/Sundering-Warcraft-Ancients-Trilogy-Book/dp/0743471210/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/gp/product/0743471210/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Sundering-Bk-War-Ancients/dp/0743471210/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Sundering-Bk-3-Richard-Knaak/9780743471213">BookDepository</a></td>
</tr>
<tr>
<td>War of the Shifting Sands [<em>Short story</em>]</td>
<td><a href="http://us.battle.net/wow/en/game/lore/short-story/shifting-sands/1">Battle.net</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Rise of the Horde</td>
<td><a href="http://www.amazon.com/World-Warcraft-Rise-Horde-No/dp/0743471385/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Rise-Horde-No-World-Warcraft/dp/0743471385/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-Warcraft-Rise-Horde-ebook/dp/B000QCTN50/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Rise-Horde-Rise-Horde-No-4-Christie-Golden/9780743471381">BookDepository</a></td>
</tr>
<tr>
<td>Unbroken [<em>Short story</em>]</td>
<td><a href="http://us.battle.net/wow/en/game/lore/short-story/unbroken/1">Battle.net</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Warcraft: Orcs and Humans</strong></td>
<td><em>The first war</em></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Last Guardian</td>
<td><a href="http://www.amazon.com/Last-Guardian-Warcraft-Book-No-3/dp/0671041517/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Last-Guardian-No-3/dp/0671041517/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/The-Warcraft-Last-Guardian-ebook/dp/B000FC0QTS/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Last-Guardian-No3-Jeff-Grubb/9780671041519">BookDepository</a></td>
</tr>
<tr>
<td><strong>Warcraft II</strong></td>
<td><em>The second war</em></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Tides of Darkness</td>
<td><a href="http://www.amazon.com/Tide-Darkness-Warcraft-Aaron-Rosenberg/dp/1416539905/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Tides-Darkness-World-Warcraft-Rosenberg/dp/1416539905/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-Warcraft-Tides-Darkness-ebook/dp/B000UZQJIC/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Tides-Darkness-Aaron-Rosenberg/9781416539902">BookDepository</a></td>
</tr>
<tr>
<td>Beyond the Dark Portal</td>
<td><a href="http://www.amazon.com/Beyond-Dark-Portal-World-Warcraft/dp/1416550860/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Beyond-Dark-Portal-World-Warcraft/dp/1416550860/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-Warcraft-Beyond-Portal-ebook/dp/B0013TX8YC/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Beyond-Dark-Portal-Aaron-Rosenberg/9781416550860">BookDepository</a></td>
</tr>
<tr>
<td><strong>Post-Warcraft II</strong> &amp; <strong>Pre-Warcraft III</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Day of the Dragon</td>
<td><a href="http://www.amazon.com/Day-Dragon-WarCraft-Book-No-1/dp/0671041525/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Day-Dragon-No-1/dp/0671041525/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/Warcraft-Day-Dragon-No-1-ebook/dp/B000FBJHTY/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Day-Dragon-No1-Richard-Knaak/9780671041526">BookDepository</a></td>
</tr>
<tr>
<td>Lord of the Clans</td>
<td><a href="http://www.amazon.com/Lord-Clans-Warcraft-Book-2/dp/0743426908/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Lord-Clans-No/dp/0743426908/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/Warcraft-Lord-Clans-2-ebook/dp/B000FC0RC4/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Lord-Clans-No-2-Christie-Golden/9780743426909">BookDepository</a></td>
</tr>
<tr>
<td>Of Blood and Honor</td>
<td><a href="http://www.amazon.com/Warcraft-Blood-Honor-ebook/dp/B000FC0WII/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Blood-Honor-ebook/dp/B003ZDOVGI/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/Warcraft-Of-Blood-Honor-ebook/dp/B000FC0WII/">Kindle</a></td>
<td>&ndash;</td>
</tr>
<tr>
<td>Road to Damnation [<em>Short story</em>]</td>
<td><a href="http://us.battle.net/wow/en/game/lore/short-story/damnation/1">Battle.net</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Warcraft III: Reign of Chaos</strong></td>
<td><em>The third war</em></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Arthas: Rise of the Lich King</td>
<td><a href="http://www.amazon.com/World-Warcraft-Arthas-Rise-Lich/dp/143915760X/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Arthas-Rise-Lich-World-Warcraft/dp/143915760X/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-of-Warcraft-Arthas-ebook/dp/B001NLL6LM/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/World-Warcraft-Arthas-Christie-Golden/9781416550778">BookDepository</a></td>
</tr>
<tr>
<td><strong>Warcraft III: The Frozen Throne</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>The war of the ancients Trilogy</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>- The Well of Eternity</td>
<td><a href="http://www.amazon.com/The-Well-Eternity-WarCraft-Ancients/dp/0743471199/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Well-Eternity-Bk-Ancients/dp/0743471199/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/Warcraft-Ancients-Well-Eternity-ebook/dp/B000FC1LP6/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Well-Eternity-Bk-1-Richard-Knaak/9780743471190">BookDepository</a></td>
</tr>
<tr>
<td>- The Demon Soul</td>
<td><a href="http://www.amazon.com/Demon-Soul-Warcraft-Ancients-Book/dp/0743471202/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Demon-Soul-Bk-Ancients/dp/0743471202/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/Warcraft-Ancients-Demon-Soul-ebook/dp/B000QBYENC/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Demon-Soul-Bk-2-Richard-Knaak/9780743471206">BookDepository</a></td>
</tr>
<tr>
<td>- The Sundering</td>
<td><a href="http://www.amazon.com/Sundering-Warcraft-Ancients-Trilogy-Book/dp/0743471210/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/gp/product/0743471210/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.co.uk/Warcraft-Sundering-Bk-War-Ancients/dp/0743471210/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Sundering-Bk-3-Richard-Knaak/9780743471213">BookDepository</a></td>
</tr>
<tr>
<td>Cycle of Hatred</td>
<td><a href="http://www.amazon.com/Cycle-Hatred-World-Warcraft-Bk/dp/0743471369/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Cycle-Hatred-World-Warcraft-Paperback/dp/0743471369/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-Warcraft-Cycle-Hatred-ebook/dp/B000GCFXKY/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Warcraft-Cycle-Hatred-Bk-4-Keith-DeCandido/9780743471367">BookDepository</a></td>
</tr>
<tr>
<td><strong>World of Warcraft</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>War of the Shifting Sands [<em>Short story</em>]</td>
<td><a href="http://us.battle.net/wow/en/game/lore/short-story/shifting-sands/1">Battle.net</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>WoW: The Burning Crusade</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Night of the Dragon</td>
<td><a href="http://www.amazon.com/World-Warcraft-Dragon-Richard-Knaak/dp/0743471377/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Night-Dragon-World-Warcraft-Richard/dp/0743471377/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-Warcraft-Night-Dragon-ebook/dp/B001FA0I2Y/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Night-Dragon-Richard-Knaak/9780743471374">BookDepository</a></td>
</tr>
<tr>
<td><strong>WoW: Wrath of the Lich King</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Stormrage</td>
<td><a href="http://www.amazon.com/World-Warcraft-Stormrage-Richard-Knaak/dp/1439189463/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Stormrage-World-Warcraft-Richard-Knaak/dp/1439189463/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-of-Warcraft-Stormrage-ebook/dp/B0037714S0/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Stormrage-Richard-Knaak/9781439189467">BookDepository</a></td>
</tr>
<tr>
<td>The Shattering: Prelude to Cataclysm</td>
<td><a href="http://www.amazon.com/World-Warcraft-Shattering-Prelude-Cataclysm/dp/1416550747/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/World-Warcraft-Shattering-Prelude-Cataclysm/dp/1416550747/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-Warcraft-The-Shattering-ebook/dp/B003L785VK/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Shattering-Christie-Golden/9781439172742">BookDepository</a></td>
</tr>
<tr>
<td><strong>WoW: Cataclysm</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Wolfheart</td>
<td><a href="http://www.amazon.com/World-Warcraft-Wolfheart-Richard-Knaak/dp/1451605765/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Wolfheart-World-Warcraft-Cataclysm-Richard/dp/1451605765/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-of-Warcraft-Wolfheart-ebook/dp/B004T4KXLE/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Wolfheart-Richard-Knaak/9781451605761">BookDepository</a></td>
</tr>
<tr>
<td>Thrall: Twilight of the Aspects</td>
<td><a href="http://www.amazon.com/World-Warcraft-Twilight-Aspects-Gallery/dp/B005X4985G/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Thrall-Twilight-Aspects-Warcraft-Cataclysm/dp/143919663X/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-Warcraft-Twilight-Aspects-ebook/dp/B004G8QNGC/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Thrall-Christie-Golden/9781416550884">BookDepository</a></td>
</tr>
<tr>
<td>Jaina Proudmore: Tides of War</td>
<td><a href="http://www.amazon.com/World-Warcraft-Jaina-Proudmoore-Tides/dp/1416550763/">Amazon.com</a></td>
<td><a href="http://www.amazon.co.uk/Jaina-Proudmore-Tides-Warcraft-Pandaria/dp/1416550763/">Amazon.co.uk</a></td>
<td><a href="http://www.amazon.com/World-Warcraft-Jaina-Proudmoore-ebook/dp/B0061NXDO0/">Kindle</a></td>
<td><a href="http://www.bookdepository.co.uk/Jaina-Proudmore-Tides-War-Christie-Golden/9781416550761">BookDepository</a></td>
</tr>
<tr>
<td><strong>WoW: Mists of Pandaria</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&ndash;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
---
pub_date: 2013-02-23
---
_template: blog/post.html

View file

@ -0,0 +1,74 @@
title: Fringe series finale: My oppinion
---
body:
![](fringe.png)
> Attention: This entry contains huge spoilers about the series finale of
Fringe. Also, lots of negative opinions, if you like the series or don't
understand how sarcasm works, leave.
I've spent the last weeks watching the show from where I dropped it -the third
season- and I can say that the final season is the worst of all. I don't know
if the show was losing audicence, if they only wanted to finish it, because I
don't know another reason to kill the show this way.
From now on I'm talking only about the fifth season, as should be the more
important and the one all of you -and myself- have fresh.
* The most stupid thing I remember: The tapes with the plan to get rid of the observers.
Walter had a plan to defeat the observers, a plan that he never tell anyone
until is destroyed from his mind by an observer. But, hey! He must have
recorded the plan or something. I mean, he is a very smart one. He did. He
recorded that he have a plan on a tape, but for knowing what it is you have to
swim accross a sea of _amber_ to find another eight tapes with the details. OH
HOW SMART IS THAT! Just a stupid reason to keep characters busy. Without this
the entire fifth season is done in two-three chapters.
* The observers powers.
So, I can read minds and predict -in some way- the future. How can SOMEONE
DEFEAT YOU IF YOU CAN PREDICT WHAT ARE THEY GOING TO DO. And more, you SAW in
Walter's mind what the plan was. The observers boss is just… asshole.
* The plan.
Tons of VHS tapes with a specific plan of how to build a machine to generate a
wormhole, but in the last moment, hey! But the observers generate wormholes
for their supplies, let's use that! Let's put humanity's hope on a last moment
change! :D
* Olivia's powers.
You used your last _cortexiphan_ -or however it's written- on revive yourself
from a headshot (LOL), then you get injected fours times, each for every
dimension swap you have to do. Despite the fact that just this sucks, there's
more: William Bell needed a lot of time just to unleash her powers, and now,
is not that she have the powers _active_, but also she knows how to swap
dimensions on her own will. Fascinating. Also, from this point Olivia don't
need fear to use her powers.
* The observers chip.
Peter removes a chip from a observer and the observer die. Removes it from
himself and nothing happen. And I'm not talking about how deep the chip was
jumping insinde the brain when Walter did the tests… just WTF, die already.
* Gun's agains the observers.
This is just a little thing: in _our_ universe, Bell design some improved guns
-that apparently only the rebels have 21 years in the future…\- that shoots
faster to deal with the observers. When Olivia travels to the alternative
universe, they don't have that guns but can kill observers without a problem.
* Time travel:
Apparently there's only one shot for a single one to time-travel: September
takes it. But when he's killed nothing prevents Walter for time traveling.
* Olivia vs. Observer Boss.
Apparently the energy needed to move a truck with the cortexiphan powers is
the electricity of the entire New York. That's efficient use of energy.
There's more things, I'm sure, but I don't remember just now. Besides, there's
more than enough here.
---
pub_date: 2013-02-24
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

View file

@ -0,0 +1,24 @@
title: Manga recommendation: Enigma
---
body:
!["Enigma"](enigma-cover.jpg)
### Summary
Haiba Sumio is a student at a Tokyo High School with an interesting ability…
He occasionally falls asleep and wakes up with premonitions of the future
written out on his "Dream Diary". With this ability, Sumio helps out people in
trouble before anything bad happens, until one day when his peaceful life
completely changes.
**Volumes**: 7
**Chapters**: 56 (finished)
**Genre**: Adventure, Mystery, School, Shounen, Supernatural
**Story/Art**: Sakaki, Kenji
---
pub_date: 2013-02-27
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View file

@ -0,0 +1,31 @@
title: Server going slow after IPTables configuration? Try this
---
body:
Recently I've started the migration of my company's servers to a new provider.
After checking that the OS installed on the -now- old servers was Ubuntu 8.04
(holy shit), I decided to make a fresh install of CentOS 6.3, cleaning up all
the servers contents and setting up everything from scratch.
After setting my iptables rules (INPUT whitelisted, OUTPUT accept all) I
noticed a big delay on every connection made to my server. After checking a
lot of things, these two solved the issue:
## Enable unilimited traffic on your loopback interface
```
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
```
## Enable traffic for connections started by your server
```
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
```
Hope this solves your issue as it did with mine.
---
pub_date: 2013-02-27
---
_template: blog/post.html

View file

@ -0,0 +1,20 @@
title: Zombiepress is here
---
body:
It finally happened. I got tired of octopress and decided to finish what I
started: my own blogging CMS.
It's a really modest thing built with django. I've added some thing to make it
easy to use (in my oppinion):
* settings.py main preferences (required for running the app) are set on environment variables instead of environment dependant settings files or the not so cool local_settings.py.
* A a key-&gt;value preferences config in the admin ([a simple django model with 3 fields](https://github.com/fmartingr/zombiepress/blob/master/zombiepress/apps/config/models.py#L5)) for settings that may be needed to modify in a live environment and would be a shame if it were on the _settings.py_ file. In example, I use it to [set some RSS preferences](https://github.com/fmartingr/zombiepress-fmartingr-theme/blob/master/blog/rss.jinja2#L4-L6) and the [Disqus shortname for the blog comments](https://github.com/fmartingr/zombiepress-fmartingr-theme/blob/master/blog/entry.jinja2#L62-L65). To disable blog comments I just need to uncheck the "pass to template" option on the required variable.
* Theming: Not an absolute state of the art, but it's function works: a themes folder and a variable to select one on the settings.py, I just need to create the basic theme.
* **(experimental)** Multilanguage support. A friend asked for a easy to use CMS with multilingual support, so I want to give it a shot. Since I never used django with managed multilingual content, it may be easy or it may be not. The code is there, someone has to try it.
---
pub_date: 2013-06-24
---
_template: blog/post.html

View file

@ -0,0 +1,46 @@
title: django-stampu: Static sites with django
---
body:
![](django-stampu.png)
> After finishing zombiepress a friend of mine wanted to use it but asked for
some kind of conversion to static since he uploads its current blog to github.
That's how this project was born.
Django as a static site? Of course, it's possible, only if your project it's
using a simple backend infrastructure, it doesn't let users modify the
database, and also doesn't have contact forms or that kind of stuff. The
conversion of a blog into static content was really easy, in about 30 minutes
I had an alpha working -which is the 0.1.2 version uploaded in github/pypi-.
django-stampu is basically a crawler. Some people led me to solutions much
more complicated. (Ex. Running a command and let the computer work.) And I
didn't like that. I wanted a conversion of the site as I see it when running
the `runserver` command, for that purpose you have to follow all the internal
links of the site and save the items as *.html if the content-type matches. It
also saves the static files in the site, but I need to look further into that,
because it can't save files needed by css files yet, it only checks for
src/href attributes on all tags in html files.
Want to try it?
1. Install django-stampu: `pip install django-stampu`
2. Add it to your `INSTALLED_APPS`
3. Execute the command: `python manage.py stamp`
4. Check the `_static` folder.
Easy, right? That's what I want to hear!
Keep in mind that this is a proof of concept, I need to improve lots of things
and add some configuration variables for people that want to customize their
sites.
If you want to contribute in any way, you can [check the source code at
github](https://github.com/fmartingr/django-stampu).
---
pub_date: 2013-07-01
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View file

@ -0,0 +1,213 @@
title: Extracting data from obfuscated java code
---
body:
![](header.png)
For those who don't know, I started a site a while ago minecraft related (yes,
[the one I dropped](/blog/2013/1/12/weekly-project-status-dropping-projects-
hard/)). If you don't know what minecraft is (really?!), you can check [the
official site](http://minecraft.net/), since this game can be a little
difficult to explain.
The project (which is online at
[minecraftcodex.com](http://www.minecraftcodex.com)) is just a database of
items, blocks, entities, etc. related to the game, but as in any other site of
this kind, entering all this information can lead to an absolute _boredom_. So
I thought... what if I can extract some of the data from the game
_classfiles_? That would be awesome! *Spoiler alert* I did it.
> Think this as my personal approach to all steps below: it doesn't mean that they're the best solutions.
## Unpackaging the jarfile and decompiling the classes
First of all, you have a _minecraft.jar_ file that it's just a packaged set of
java compiled files, you can just `tar -xf` or `unzip` it into a folder:
```
unzip -qq minecraft.jar -d ./jarfile
```
With this we now have a folder called _jarfile__ _filled with all the jar
contents. We now need to use a tool to decompile all the compiled files into
.java files, because the data we're looking for it's hard-coded into the
source. For this purpose we're going to use [JAD](http://varaneckas.com/jad/),
a java decompiler. With a single line of _bash_ we can look for all the .class
files and decompile them into .java source code:
```
ls ./jarfile/*.class | xargs -n1 jad -sjava -dclasses &> /dev/null
```
All the class files have been converted and for ease of use, we've moved them
into a separate directory. But there's a lot of files! And also, when we open
one...
``` java
public class aea extends aeb
{
public aea()
{
}
protected void a(long l, int i, int j, byte abyte0[], double d,
double d1, double d2)
{
a(l, i, j, abyte0, d, d1, d2, 1.0F + b.nextFloat() * 6F, 0.0F, 0.0F, -1, -1, 0.5D);
}
// ...
}
```
Look at that beautiful obfuscated piece of code! This is getting more
interesting at every step: almost 1.600 java files with obfuscated source
code.
## Searching for the data
I took the following approach: Since I know what I'm looking for (blocks,
items, etc) and I also know that the information is hard-coded into the
source, there must be some kind of string I can use to search all the files
and get only the ones that contains the pieces of information I look for. For
this test, I used the string "diamond":
```
$ grep diamond ./classes/*
./classes/bfp.java: "cloth", "chain", "iron", "diamond", "gold"
./classes/bge.java: "cloth", "chain", "iron", "diamond", "gold"
./classes/kd.java: w = (new kc(17, "diamonds", -1, 5, xn.p, k)).c();
./classes/rf.java: null, "mob/horse/armor_metal.png", "mob/horse/armor_gold.png", "mob/horse/armor_diamond.png"
./classes/xn.java: p = (new xn(8)).b("diamond").a(wh.l);
./classes/xn.java: cg = (new xn(163)).b("horsearmordiamond").d(1).a(wh.f);
```
As you can see, with a simple word we've filtered down to five files (from
1.521 in this test). Is proof that we can get some information from the source
code and we now to filter even more, looking around some files I selected
another keyword: _flintAndSteel_, works great here, but in a real example you
will need to use more than one keyword to look for data.
```
$ grep flintAndSteel ./classes/*
./classes/xn.java: public static xn k = (new xh(3)).b("flintAndSteel");
```
Only one file now, we're going to assume that all the items are listed there
and proceed to extract the information.
## Parsing the items
This was the more complicated thing to do. I started doing some regular
expressions to matchs the values I wanted to extract, but soon that became
inneficient due to:
- The obfuscated code varies with every released version/snapshot -or it should.
- The use of OOP difficulted method searching with RegEx matching, since the names could change from version to version, making the tool unusable on updates.
- The need to modify the RegEx if something in the code changes, or if we want to extract some other value.
After some tests, I decided to _convert_ the java code into python. For that,
I used simple find and match to get the lines that had the definitions I
wanted, something line this:
``` java
// As a first simple filter, we only use a code line if a double quote is found on it.
// Then, regex: /new (?P<code>[a-z]{2}\((?P<id>[1-9]{1,3}).*\"(?P<name>\w+)\"\))/
// ...
T = (new xm(38, xo.e)).b("hoeGold");
U = (new yi(39, aqh.aD.cE, aqh.aE.cE)).b("seeds");
V = (new xn(40)).b("wheat").a(wh.l);
X = (vr)(new vr(42, vt.a, 0, 0)).b("helmetCloth");
Y = (vr)(new vr(43, vt.a, 0, 1)).b("chestplateCloth");
// ...
```
Since that java code is not python evaluable, just convert it:
- Remove unmatched parenthesis and double definitions
- Remove semicolons
- Remove variable definitios
- Converted arguments to string. This can be improved a lot, leaving decimals, converting floats to python notation, detecting words for string conversion, etc. Since for now I am not using any of the extra parameters this works for me.
- Be careful with reserved python names! (`and`, `all`, `abs`, ...)
``` python
// Java: U = (new yi(39, aqh.aD.cE, aqh.aE.cE)).b("seeds");
yi("39", "aqh.ad.cE", "aqh.aE.cE").b("seeds")
// Java: bm = (new xi(109, 2, 0.3F, true)).a(mv.s.H, 30, 0, 0.3F).b("chickenRaw");
xi("109", "2", "0.3F", "true").a("mv.s.H", "30", "0", "0.3F").b("chickenRaw")
```
Now I defined an object to match with the java code definitions when
evaluating:
``` python
class GameItem(object):
def __init__(self, game_id, *args):
self.id = int(game_id)
def __str__(self, *args):
return "<Item(%d: '%s')>" % (
self.id,
self.name
)
def method(self, *args):
if len(args) == 1 and isinstance(args[0], str):
"Sets the name"
self.name = args[0]
return self
def __getattr__(self, *args):
return self.method
```
As you can see, this class have a global "catch-all" method, since we don't
know the obsfuscated java names, that function will handle every call. In that
concrete class, we now that an object method with only one string parameter is
the one that define the item's name, and we do so in our model.
Now, we will evaluate a line of code that will raise and exception saying that
the class name _&lt;insert obfuscated class name here&gt;_ is not defined.
With that, we will declare that name as an instance of the GameItem class, so
re-evaluating the code again will return a GameItem object:
``` python
try:
# Tries to evaluate the piece of code that we converted
obj = eval(item['code'])
except NameError as error:
# Class name do not exist! We need to define it.
# Extract class name from the error message
# Defined somewhere else: class_error_regex = re.compile('name \'(?P<name>\w+)\' is not defined')
class_name = class_error_regex.search(error.__str__()).group('name')
# Define class name as instance of GameItem
setattr(sys.modules[__name__], class_name, type(class_name, (GameItem,), {}))
# Evaluate again to get the object
obj = eval(item['code'])
```
And with this, getting data from source code was possible and really helpful.
A lot of things could be improved from this to get even more information from
the classes, since after spending lot's of time looking for certain patterns
on the code I can say what some/most of the parameters mean, and that means
more automation on new releases!
## Real use case
Apart from getting the base data for the site (all the data shown on minecraft
codex is directly mined from the source code), I made up a tool that shows
changes from the last comparision -if any. This way I can easily discover what
the awesome mojang team added to the game every snapshot they release:
![](diff.png)
This is the main tool I use for minecraft codex, is currently bound to the
site itself but I'm refactoring it to made it standalone and publish it on
github.
---
pub_date: 2013-07-04
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View file

@ -0,0 +1,109 @@
title: How to install and configure the yubikey-pam module on archlinux
---
body:
![](yubico.jpg)
Not so long ago I've been gifted with a Yubikey. It's a two-auth hardware
solution with multiple auth methods (OTP, Challenge-response, OATH-HOTP and
static password). It easily scaled to one of my favourite and most useful
gadgets.
I've been a google authenticator user for a while, but the yubikey is just
much easier to work with: when configured, you only need to tap a button on
the usb stick to generate your key. You can use this in many ways, but in this
post I'm focusing on ssh authentication and how to install the yubico-pam
module into an Arch installation.
## Installing the required packages
Thanks to the awesome arch community we already have the needed packages on
the AUR, these are: [yubico-pam-
git](https://aur.archlinux.org/packages/yubico-pam-git/), [yubico-c-client-
git](https://aur.archlinux.org/packages/yubico-c-client-git/), [yubikey-
personalization-git](https://aur.archlinux.org/packages/yubikey-
personalization-git/) and
[libyubikey](https://aur.archlinux.org/packages/libyubikey/). Keep in mind
that you _may_ need to install more packages depending on your system
installation.
You can install that with your favourite AUR helper or using `makepkg`:
```
$ curl -O https://aur.archlinux.org/packages/li/libyubikey/libyubikey.tar.gz
$ tar xvzf libyubikey.tar.gz
$ cd libyubikey
$ makepkg PKGBUILD
# ...
$ sudo pacman -U libyubikey-1.10-2-x86_64.pkg.tar.xz
```
Repeat that step for all the packages, in order: _libyubikey_, _yubico-c-
client_, _yubikey-personalization_ and _yubico-pam_. If you have trouble
installing from the AUR [refer to the appropiate wiki
page](https://wiki.archlinux.org/index.php/AUR#Installing_packages).
## Configure the PAM module
Edit `/etc/pam.d/sshd` and add on top on the rest of the auth modules:
```
auth sufficient pam_yubico.so id=XXXX key=XXXX
```
You can obtain an ID/key conbination by registering your yubikey [at this
page](https://upgrade.yubico.com/getapikey/).
## Authorization methods
### Individual authorization mapping
If your server have multiple users this is the easiest method to let them
configure their yubikeys. You just need to create the file
`$HOME/.yubico/authorized_yubikeys` with the following contents:
```
<username>:<Yubikey token ID 1>[:<Yubikey token ID 2][:...]
```
The yubikey token identifier can be obtained by removing the last 32
characters of any OTP value, and you can add more than one ID to the file.
Restart your ssh server to apply the changes.
### Central authorization mapping
Create a file on `/etc/yubikey_mappings` that will contain all your users and
their respective yubikey token identifiers, like this:
```
<first username>:<Yubikey token ID 1>[:<Yubikey token ID 2][:...]
<second username>:<Yubikey token ID 3>[:<Yubikey token ID 4][:...]
```
For this to work, you need to specify this file to the pam module `authfile`
parameter:
```
auth sufficient pam_yubico.so id=XXXX key=XXXX authfile=/etc/yubikey_mappings
```
After that estart your ssh server to apply the changes.
## Logging in
The next time you're asked for a password on you ssh login you can use a
yubikey OTP instead of your current password -if you have any-.
This method works pretty well with authorized ssh keys as well, since you will
log-in automatically from a computer with a configured ssh key but an OTP -or
password- will be required for logging in from anywhere else.
**Yubico-pam module |** [Github](https://github.com/Yubico/yubico-pam)
**Yubico |** [Home page](http://www.yubico.com/)
---
pub_date: 2013-07-09
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View file

@ -0,0 +1,80 @@
title: Warcraft 3 on MAC with wineskin
---
body:
A few days ago, I bought Warcraft III. I never finished it before, since I
didn't own the game, and lately I had this inner urge to play a game on the
Warcraft series. Since going back to World of Warcraft isn't an option, I
decided to rollback to the part of the Warcraft lore that is unknown to me.
Sadly after buying the game I discovered that they dropped support for the
game when Apple did the conversion of their hardware from powerpc to intel.
There was no way of running the mac version of the game on newer hardware, and
I even contacted Blizzard support about the matter, but the answer was the one
I feared: I had to use wine. This reminded me of the old days when I was a
linux user and this was needed in order to play anything on linux.
![](wineskin.png)
## Installing the needed software
First of all, you will need to download
[Wineskin](http://wineskin.urgesoftware.com/tiki-
index.php?page=Wineskin%2C+Play+your+favorite+Windows+games+on+Mac+OS+X+without+needing+Microsoft+Windows),
as we're going to use this to "emulate" our windows environment. Also,
download the windows warcraft downloaders from your battle.net account.
Execute it and download the last engine (clicking on the plus symbol) and also
update the wrapper.
You should see your wineskin window similar to the one on the left.
Now you need to create a clean wrapper for your Warcraft III installation.
## Creating the wrapper
Just click on the "Create New Blank Wrapper" button and give it a name. I will
go with "Warcraft III.app". It will ask you to install some mono/gecko
libraries needed for the wrapper. Just go with it and wait until all the
process finishes.
You will be prompted if you want to open the containing folder, do it since
now we need to configure our wrapper.
Now, right click the app you created and select "Show package contents".
Execute Wineskin.app, and select "Install software", on the next panel select
"Select setup executable" and go to the path of your warcraft 3 downloader,
that will prompt the installation menu when it finishes.
Install your warcraft as you would in a windows machine, and when you exit the
installer wineskin will ask for the main executable file, select "Warcraft
III.exe". After that, repeat the process with the Frozen Throne executable.
## Configuration
We need to tweak some things before we can play, here's what I did:
* Go to set screen options and set windowed. Since I have a 16:9 screen and the game runs at 4:3, everything is streched. Maybe there's a 16:9 patch around the net.
* I customized the icon with [this one](http://icons.iconarchive.com/icons/3xhumed/mega-games-pack-36/256/Warcraft-3-Reign-of-Chaos-5-icon.png). You need to convert it to ICNS for using it with wineskin (you can use [this online tool](http://iconverticons.com/online/)). Copy it into the package and select on the advanced options in the wineskin executable.
* If you want to play with the frozen throne expansion, change the Windows EXE on the advanced settings panel to "Frozen Throne.exe".
* Since wine can't play the cinematics, you can safely remove/rename the movies folder under the warcraft installation folder. (Default: `drive_c/Program Files/Warcraft III`)
* Delete the game installers if you stored them into the wineskin package to keep the .app file size to a minimum.
## Enjoy!
![](game.png)
It's done! Store the Warcraft III.app somewhere if you don't want to repeat
the process if you delete the game.
### Updates:
* Using the -opengl EXE flag will get you a smoother framerate. (thanks to **Sylvain Prevost** in the comments)
* Suggested engine: WS9Wine1.7.2. (by **Sylvain Prevost** in the comments)
---
pub_date: 2013-08-10
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,215 @@
title: Reading data from iOS backups: Manifest.mbdb
---
body:
<p>Recently, I&#39;ve been working on a tool to extract data from iOS backups, and one of the files that a backup have is the Manifest.mbdb (or mbdx for old versions).</p>
<p>The Manifest.mbdb is a binary file that contains records for the hashed files that the backup includes, the hashed files can be anything that a certain application requires or saved, from a image thumbnail to a sqlite3 database file.</p>
<p>Reading the file can be tricky, since the record itself have a variable length, so you can just split the file based on a delimiter, you need to read it byte to byte. I&#39;m going to expose here the data structures this file contains:</p>
<table border="0" cellpadding="0" cellspacing="0" id="string_entity" style="width:100%">
<tbody>
<tr>
<td colspan="4"><strong>String entity</strong></td>
</tr>
<tr>
<td><strong>Type</strong></td>
<td><strong>Name</strong></td>
<td><strong>Description</strong></td>
<td><strong>Null value</strong></td>
</tr>
<tr>
<td>uint16</td>
<td>Lenght</td>
<td>Length of the string</td>
<td>0x0000</td>
</tr>
<tr>
<td>ASCII data</td>
<td>Data</td>
<td>Actual string of (length) size. Don&#39;t need to read this if length is null.</td>
<td><em>nothing</em></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0" id="property_entity" style="width:100%">
<tbody>
<tr>
<td colspan="3"><strong>Property entity</strong></td>
</tr>
<tr>
<td><strong>Type</strong></td>
<td><strong>Name</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td><a href="#string_entity">string</a></td>
<td>Key</td>
<td>Key of the property</td>
</tr>
<tr>
<td><a href="#string_entity">string</a></td>
<td>value</td>
<td>Property value</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tbody>
<tr>
<td colspan="4"><strong>Record entity</strong></td>
</tr>
<tr>
<td><strong>Type</strong></td>
<td><strong>Field name</strong></td>
<td><strong>Description</strong></td>
<td><strong>Null value</strong></td>
</tr>
<tr>
<td><a href="#string_entity">string</a></td>
<td>Domain</td>
<td>App domain</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><a href="#string_entity">string</a></td>
<td>Path</td>
<td>Path to file</td>
<td>0x0000</td>
</tr>
<tr>
<td><a href="#string_entity">string</a></td>
<td>Target</td>
<td>&nbsp;</td>
<td>0xFFFF</td>
</tr>
<tr>
<td><a href="#string_entity">string</a></td>
<td>Hash</td>
<td>SHA-1 hash of the file</td>
<td>0xFFFF</td>
</tr>
<tr>
<td><a href="#string_entity">string</a></td>
<td>Encription key</td>
<td>Encryption key -if any-</td>
<td>0xFFFF</td>
</tr>
<tr>
<td>uint16</td>
<td>Mode</td>
<td>File mode:
<ul>
<li>0xAXXX: Symlink</li>
<li>0x4000: Directory</li>
<li>0x8000: File</li>
</ul>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>uint64</td>
<td>inode number</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>uint32</td>
<td>User ID</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>uint32</td>
<td>Group ID</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>uint32</td>
<td>Last modified time</td>
<td>EPOCH</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>uint32</td>
<td>Last accesed time</td>
<td>EPOCH</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>uint32</td>
<td>Created time</td>
<td>EPOCH</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>uint64</td>
<td>File size</td>
<td>&nbsp;</td>
<td>0x0...0</td>
</tr>
<tr>
<td>uint8</td>
<td>Flag</td>
<td>0x1 to 0xB</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>uint8</td>
<td>Properties number</td>
<td>Number of properties to follow with this record</td>
<td>0x00</td>
</tr>
<tr>
<td><a href="#property_entity">property</a>[0...n]</td>
<td>Property objects</td>
<td>Each property object -if any-</td>
<td><em>nothing</em></td>
</tr>
<tr>
<td>--</td>
<td>File name</td>
<td>SHA1(domain + path)</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p><strong>More info:&nbsp;</strong> <a href="http://theiphonewiki.com/wiki/ITunes_Backup#Manifest.mbdb">The iPhone Wiki</a> | <a href="http://nagareshwar.securityxploded.com/wp-content/uploads/2012/09/mbdb-record.jpg">This image I found</a></p>
---
uint16 | Mode | File mode:
* 0xAXXX: Symlink
* 0x4000: Directory
* 0x8000: File
|
uint64 | inode number | |
uint32 | User ID | |
uint32 | Group ID | |
uint32 | Last modified time | EPOCH |
uint32 | Last accesed time | EPOCH |
uint32 | Created time | EPOCH |
uint64 | File size | | 0x0...0
uint8 | Flag | 0x1 to 0xB |
uint8 | Properties number | Number of properties to follow with this record |
0x00
property[0...n] | Property objects | Each property object -if any- | _nothing_
\-- | File name | SHA1(domain + path) |
**More info: ** [The iPhone Wiki](http://theiphonewiki.com/wiki/ITunes_Backup#Manifest.mbdb) | [This image I found](http://nagareshwar.securityxploded.com/wp-content/uploads/2012/09/mbdb-record.jpg)
---
pub_date: 2013-11-29
---
_template: blog/post.html

View file

@ -0,0 +1,65 @@
title: How to: Starbound dedicated server on a linux machine
---
body:
![Starbound logo](starbound-
logo.jpg)
The day it's here! Starbound beta is finally here, and what could be better
than having a dedicated server to play with your friends? Let's get this done.
## Install SteamCMD
Official documentation: <https://developer.valvesoftware.com/wiki/SteamCMD>
Basically you need to download it's shell script to manage steam apps, take
special attention to the lib32 section if you're running the server in a 64bit
machine.
```
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar xzf steamcmd_linux.tar.gz
```
## Install Starbound on the server
You will need to login with your steam username here to download/update
starbound. Your account** is not needed** to keep the server running.
```
./steamcmd.sh
# Steam updating and validating stuff
Steam> login your_username_here
# Your password WILL BE VISIBLE. But after a first login
# your credentials will be cached so you don't need to
# expose them everytime you need to use the steamcmd.
Steam> app_update 211820
# This will install starbound, it will take a while
# depending on the server bandwidth.
Steam> app_update 211820 validate
# Validate installation, just in case.
# I do this in two separate steps because -at least for me-
# validating on a fresh install take a lot longer that
# just installing and validating afterwards. Don't sure why.
Steam> quit
# Finished!
```
## Start the server
Go to `Steam/SteamApps/common/Starbound/linuxXX/` (where XX is 32 or 64 based
on your server architecture).
Launch `launch_starbound_client.sh`
If you want to use the universe you played on your computer, just upload the
universe folder found on your computer to the same folder where the server
script is.
Happy gaming!
---
pub_date: 2013-12-05
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,67 @@
title: Amazon EC2: No space left on device
---
body:
So a funny thing happened today at out pre-production environment. I was
performing our pre-big-PR deployment when a beautiful error was shown in my
terminal:
```
cannot create X: No space left on device
```
What?! How could that be possible. I know that our environment don't have a
lot of bytes for us to play with but having the storage already full with our
database and other services outside this machine just wasn't possible. And I
was right.
```
fmartingr@pre-production:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 59G 37G 21G 65% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 2.0G 12K 2.0G 1% /dev
tmpfs 396M 400K 395M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
none 100M 0 100M 0% /run/user
```
What?! Now I sure don't understand a thing. I was laughing hysterically when
my brain just started working as I remembered an old friend: the
[inode](http://www.wikiwand.com/en/Inode).
```
fmartingr@pre-production:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/xvda1 3932160 3932160 0 100% /
none 505855 2 505853 1% /sys/fs/cgroup
udev 504558 403 504155 1% /dev
tmpfs 505855 332 505523 1% /run
none 505855 1 505854 1% /run/lock
none 505855 1 505854 1% /run/shm
none 505855 4 505851 1% /run/user
```
F**k you. Our deploys are made using "isolated" builds. That is, we reinstall
pip/bower requirements **for every build.** So each build take about ~50k
inodes, and we keep some in case some rollback is needed, but of course,
keeping two months old builds wasn't needed at all, so I made a script that
just deletes builds older than two weeks and our poor thing was happy again.
To search which folder of your server is eating the inode limit, you can run
this command:
```
find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -nr
```
This will show the path name and the inode count, keep going inside dirs to
get some detailed input, once found, just delete the files that are causing
havok.
---
pub_date: 2015-05-04
---
_template: blog/post.html

View file

@ -0,0 +1,21 @@
title: Manga recommendation: Dice - The cube that changes everything
---
body:
![Dice](cover.jpg)
### Summary
Dongtae is rock bottom in everything: Looks, grades, life, everything. But all
that might change. If you could change your life by playing a game, would you?
**Type: **Manhwa
**Chapters**: 93+ (ongoing)
**Genre**: Action, Drama, Fantasy, Psychological, Romance, School Life, Shounen, Slice Of Life, Supernatural, Webtoons
**Story/Art**: Yun Hyun Suk
---
pub_date: 2015-05-07
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View file

@ -0,0 +1,23 @@
title: Manga recommendation: Kamisama no Iutoori Ni
---
body:
![Dice](88875.jpg)
### Summary
Starts at the same time as the prequel but it follows the survival story of
new characters, the ones who didn't go to school at the first day, who face
different challenges than those in the prequel.
**Prequel: **[Kamisama no Iutoori](http://fmartingr.com/blog/2013/01/20/manga-recommendation-kamisama-no-iutoori-fujimura-akeji/)
**Chapters**: 107 (ongoing)
**Genre**: Action, Horror, Shounen, Supernatural
**Story**: Muneyuki Kaneshiro
**Art**: Akeji Fujimura
---
pub_date: 2015-05-14
---
_template: blog/post.html

View file

@ -0,0 +1,94 @@
title: PiWeek VIII
---
body:
> While writing this post all the content was deleted because of a hardware
problem and sadly this is less that I wrote originally. :(
![](cj9ntbguwaau-ip.jpg)
This week have been awesome. After two years I finally went back to the
Personal Innovation Week for a second time, and as motivated as it were, I'm
planning to repeat at the end of the year. For those who don't know what a
ΠWEEK is, [its site](http://piweek.tumblr.com/) explains it very well:_ ΠWEEK
/paɪ wiːk/ is an original idea by Kaleidos and it consists in allowing
employees from participant technology companies to leave their ongoing work in
standby and dedicate an entire week to personal projects. The plan is to enjoy
a ΠWEEK every six months, particularly in December and July, and allow
employees to play and innovate_.
Putting it simple: you can either present you own project for people to hop in
or you can join anothers team project and create something, play with new
technologies and of course, learn new stuff. This time the teams and projects
were incredible, I meet up with the Kaleidos team again after a long time (too
long!), played some Winjammers (and got beat every single time), but of
course, learn a few new things as you do every time you play around.
## Our team
![](piweek-viii-team.jpg)
From left to right, top to bottom:
* Ramiro Sanchez ([@rsanchezbalo](https://twitter.com/rsanchezbalo)): Project leader
* Juan Francisco Alcantara (no-twitter man): Front-end
* Andres Moya ([@amoyafoss](https://twitter.com/amoyafoss)): Back-end
* _Masles Roy_ ([@maslesroy](https://twitter.com/maslesroy)): Illustration
* Felipe Martin ([@fmartingr](https://twitter.com/fmartingr)): Back-end
* Antonio de la Torre ([@adelatorrefoss](https://twitter.com/adelatorrefoss)): Front-end
## Our project
![](guild-empire_9xA43PS.png)
Our project, designed by Ramiro and some other friends is a really complex
game in which you take control of a guild and it's guild members playing
against other player's guilds.
Each turn, a player send every guild member to do some actions (line wood-
cutting, praying, breaking a leg to another guild member, etc) and that action
is dice-rolled witch success/failure results. Each member have it's own stats
and adquired conditions (buffs/debuffs) and so on. The MVP idea is to adquire
reputation and the guild who have the most reputation in turn 20 wins, but
there's a 30 page document with a lot of non-developed stuff for the game.
It's was really fun to make stuff different than my daily job routine, using
libraries (or just plain python types) than django. There's a world out there
and even if it was little things you end up always learning something new.
## Honorable mentions
Even if my team end up winning this ΠWEEK, there was projects that also show
how much can you achieve in just five days with a smaill team, my personal two
favourites were:
* **Zombie time!!**, a multiplayer turn-based-and-real-time zombie survival game. This was expected since I love zombie games. They managed to get an almost fully playable game in just five days, be sure to check it out because it seemed really fun.
* **UXBox**, an interactive wireflaming tool created because there aren't any real open source options out there.
But of course, there was a lot of projects and people working there, be sure
to check it out in the [official piweek blog](http://piweek.tumblr.com/) or
[in the piweek github group](https://github.com/piweek).
## Conclusion
![](piweek-viii-presentations.jpg)
The ΠWEEK is an awesome event and more companies should start leting their
people use a percentage of the time into personal projects, learning new stuff
and improving their knowledge. Or you can just join the ΠWEEK two weeks a year
so awesome people start making awesome stuff.
Really, if you are a developer and can join this event, do it, and if you are
their boss, **let them do so!**
_Post pictures by
[@bameda](https://twitter.com/bameda/status/621329367780753408),
[@yamila_moreno](https://twitter.com/yamila_moreno) and
[@ilopmar](https://twitter.com/ilopmar/status/622002398341545984)_
---
pub_date: 2015-07-18
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View file

@ -0,0 +1,29 @@
title: Manga recommendation: One-punch man
---
body:
![Dice](/onepunchman_manga_cover.png)
### Summary
In this new action-comedy, everything about a young man named Saitama screams
"AVERAGE," from his lifeless expression, to his bald head, to his unimpressive
physique. However, this average-looking fellow doesn't have your average
problem... He's actually a superhero that's looking for tough opponents! The
problem is, every time he finds a promising candidate he beats the snot out of
them in one punch. Can Saitama finally find an evil villain strong enough to
challenge him? Follow Saitama through his hilarious romps as he searches for
new bad guys to challenge!
**Chapters**: 46 (ongoing)
**Genre**: Action, Comedy, Parody, Sci-Fi, Super Power, Supernatural, Seinen
**Story**: Yusuke Murata
**Art**: ONE
---
pub_date: 2015-07-22
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

View file

@ -0,0 +1,34 @@
title: Emacs: Day zero
---
body:
They tricked me.
I was confortably on my Atom editor when I had to open this ugly thing.
![](emacs-original.png)
I'm trying to make the change. Also, to make things easier I switched my
layout to US since all my servers have that keyboard layout but... my muscle
memory is really good, so I still miss a lot.
After a basic configuration yesterday, I thought that the best way to achieve
this was to change completely from one to another and that's what I've done,
work the entire day with this. At first I was slowed down a bit because I had
to configure some keybinding I was used to and install the basic addons I use
the most (and setup them emacs style), but after a short period I was _mostly_
used to the harm of my little finger. It still hurts.
It's a long way to go and this is only day zero but I will keep writing posts
every one or two weeks with my improvements as a newbie guide to emacs.
Also, my UI now looks _more or less_ like this:
![](/media/ckeditor/2015/07/23/emacs.png)
---
pub_date: 2015-07-23
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View file

@ -0,0 +1,25 @@
title: Manga recommendation: Eden no ori
---
body:
![Dice](cage_of_eden_volume_1_cover.jpg)
### Summary
Akira and his classmates are travelling on a plane when it crashes onto an
island inhabited by species thought to have been extinct. The situation
becomes increasingly desperate as some of Akira's classmates are eaten alive,
while some kill others in desperation. Now Akira and a few other survivors are
trying to survive what seems to be a horrible nightmare.
**Chapters**: 185 (finished)
**Genre**: Action, Adventure, Comedy, Drama, Ecchi, Horror, Mystery, Psychological, Romance, Shounen, Tragedy
**Story**: Yamada Yoshinobu
**Art**: Yamada Yoshinobu
---
pub_date: 2015-07-29
---
_template: blog/post.html

View file

@ -0,0 +1,67 @@
title: Tmux basics
---
body:
![](2015/08/04/tmux.png)
Discovered it not a long time ago (and now replaced with the experimental
version of iterm2 [because of goodies](https://iterm2.com/features.html)),
tmux deserves a lot of attention because it have lots of potential.
TMUX stands for Terminal Multiplexer. _It lets you switch easily between
several programs in one terminal, detach them (they keep running in the
background) and reattach them to a different terminal. And do a lot more._
Yeah, they sell themselves well.
For the novices, it lets you have panels (split terminals) and windows just
with some keybinds, detaching from them (so they keep running) and with the
possibility of storing configurations for certain tasks, in which you need to
open a running server and editor and some watcher at the same time, just with
a command.
For example, if you are like in the top screenshot, pressing `CTRL`+`b` `%`
`CTRL`+`b` `"` changes the layout to this:
![](tmux-horver.png)
And those numbers with a tilde at the bottom? The open windows. You can open
more pressing `CTRL`+`b` `c`, like this:
![](tmux-window.png)
This are the two basic things you will use everyday. Of course, there are
[more stuff you can do](http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man1/tmux.1?query=tmux&sec=1), but for the basics I will list the more
frequent keybinds here to start using it right now.
Meta key | `CTRL`+`b`
---|---
Split pane horizontal | `Meta`+`"`
Split pane vertical | `Meta`+`%`
Swap pane | `Meta`+`o`
Kill pane | `Meta`+`x`
Toggle focus on current pane | `Meta`+`z`
Show pane numbers | `Meta`+`q`
Press a the number of the pane you want to focus when shown.
Break pane into window | `Meta`+`+`
Restore window to pane | `Meta`+`-`
Change pane layout | `Meta`+`spacebar`
Create new window | `Meta`+`c`
Switch to window #x | `Meta`+`<number>`
Kill window | `Meta`+`&`
Next window | `Meta`+`n`
Previous window | `Meta`+`p`
List windows | `Meta`+`w`
Rename window | `Meta`+`,`
Find window | `Meta`+`f`
**Homepage: **[tmux](https://tmux.github.io)
**My tmux.conf:** [Github](https://github.com/fmartingr/dotfiles/blob/master/home/.tmux.conf)
**Cheatsheet by [MohamedAlaa](https://github.com/MohamedAlaa)**: [Tmux cheatsheet gist](https://gist.github.com/MohamedAlaa/2961058)
---
pub_date: 2015-08-04
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,26 @@
title: Manga recommendation: The Gamer
---
body:
![](the-gamer.png)
### Summary
Han Jee-Han, a normal high school student, suddenly develops a special power
where his entire world is shifted into a game-like setting. He can see the
power levels of people, look at the stats of a seemingly normal item, get
abilities, and even level up! Follow Han Jee-Han as he discovers how to use
this power, and maybe even where it came from.
**Type: **Manhwa
**Chapters**: 90+ (ongoing)
**Genre**: Action, Adventure, Comedy, School Life, Shounen, Supernatural
**Story**: Sung San-Young
**Art**: Sang-Ah
---
pub_date: 2015-08-13
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -0,0 +1,22 @@
title: 2016 updates
---
body:
It's sad but I always end up not writing in the blog for some reason. I will
post here a short TL;DR of what happened in the last months and some of the
stuff I want to do for the site (and what I've already done).
* First of all, I got promoted at my job (this was like... months ago!) which left me with even less time that before for personal stuff. I can't believe I'm saying this but when I get out of the office the last thing I want to do is sitting in front of my computer again.
* Good part, I have been trying all the stuff at work I couldn't before and adding goodies to the dev team (automatic code reviews, unit testing, deployments, etc)
* Bad stuff: now I develop less than before. :_
* Also, I wasn't comfortable with how the editor on the site worked (it's a CKEditor) because I'm a big fan of markdown so I wasn't eager to do nothing until some day I did a clumsy implementation to support markdown conversion to HTML to the blog. [I also added some other goodies](https://trello.com/b/QgoVFfl2/fmartingr-com).
* More stuff to the mix? I got pretty much overwhelmed with all the things I had to/want to/should do on a daily basis so my workflow was chaotic. I have been trying new habits to sort everything out and now I'm more or less comfortable with the results. And I will write an entry about that :)
* Related with the last one now I'm not giving up on reading all the stuff in "the read later vault" which until not so long ago was filled with diverse stuff and articles came in but not out.
* I play a bit now! Since I have thoughts and days in order now I can rest from time to time to play some videogames. It was time to remove the dust from my 3DS.
---
pub_date: 2016-04-08
---
_template: blog/post.html

View file

@ -0,0 +1,46 @@
title: The penguin trials
---
body:
I've been using OS X for my workstation environment for about five or six
years now. I always say (and believe to this moment) that OS X is the most
comfortable environment for work.
It has an stable window manager, a terminal that does not suck and lot's of
software related to my daily activities. I can reinstall and have a fully
working environment from scratch in an hour or so (no hdd dupes, a full OS
installation).
I've been really comfortable with this for a long time, and with [the last
features coming to windows](http://arstechnica.com/information-
technology/2016/03/ubuntus-bash-and-linux-command-line-coming-to-windows-10/)
I thought that it was time to refresh my GNU/Linux rants and give it a try
again like I did to Android not so long ago.
So, here's the deal: Starting today I'm going to spend one month on a linux
environment at work to see how it goes. I think the starting transition will
be easier since at work most of the company tools are online or done via ssh,
and my most used app is emacs and I use it directly on a terminal.
The chosen penguin is: [AntergOS](https://antergos.com/) (based on [Arch
Linux](https://www.archlinux.org/), it simplified me the installation process)
with [i3](https://i3wm.org/) as the window manager. I always wanted to try a
tiling _wm_ so this is the best moment to do so, and Arch was my favourite OS
back at the time and I will know how to use most of the internals if it hasn't
changed a lot.
![](wallpaper.png)
For now I just have installed my most common apps and I haven't tuned a bit
apart from the screensaver. I'm sure this will change in no time. I will try
to make weekly or biweekly entries with updates, or if things don't get out of
control just a summary after a month.
Let's see how it goes!
---
pub_date: 2016-04-11
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -0,0 +1,284 @@
title: The penguin trials after two weeks
---
body:
It's been two weeks already and I will make a quick post with two subjects:
the stuff broken that needed to be fixed (from my point of view) and
improvements to the workstation that made my life easier.
After other two weeks I will post a summary with the good and bad parts.
## Stuff fixed
### Lightdm black screen
After the first reboot the first problem appeared, the lightdm login window
was a black screen (accepting input but showing nothing). I remember that from
not so long ago when I tried to install linux on my home computer and that
happened, luckily it had a solution, I just needed to install `lightdm-gtk-
greeter` and replace it at the lightdm configuration.
# /etc/lightdm/lightdm.conf
# ...
greeter-session=lightdm-gtk-greeter
# ...
### Better font rendering for i3
The default fonts for the i3bar and so on are a bit clunky for my personal
taste so I changed the rendering from `pango` to `xft` and now it looks nice.
font xft:monospace 8
### Better font rendering system wide (ala. OS X)
One of my worst problems with linux is the font rendering. Everything looks
worse than on OS X, that's a fact. Even people using linux desktops say it
when looking text on a OS X machine. Luckily I found `infinality`, a patch for
the font rendering in the freetype2 package that left my fonts almost
_Macish_.
I just installed the `infinality-bundle` following [the official ArchLinux
Wiki entry](https://wiki.archlinux.org/index.php/Infinality) on the subject
and used the setup for the _Soft of OS X_ appareance editing the
`/etc/profile.d/infinality-settings.sh` using the `ultimate5` configuration.
export INFINALITY_FT="ultimate5"
Just restart X to the settings to take effect. I haven't seen problems with
the infinality patch until now.
## Improvements over the base system
### Adding some background with feh
The most basic stuff! I don't really know if there's another way to do this
but looking around I found that using `feh` you can just point to an image
file and use that as wallpaper.
Just adding this to my i3 config file:
exec_always feh --bg ~/.config/i3/wallpaper.png
I want to improve it having a script that will iterate over png images inside
a folder and using one at random but since I don't need fancy stuff this will
work for now.
### Running stuff when I log in
To start programs when you log in at your session adding them to your i3
configuration seems like the way to go:
# Startup programs
exec dropbox
### Adding a lock screen with i3lock
Another thing I missed a lot. When I leave my desk I lock my computer so no
one can, just say, put a David Hasselhoff wallpaper on it or something, so
with `i3lock`, `scrut`, a bash script and a key binding I have a very nice
screen locker in place!
#!/bin/sh
# Take screenshot
scrot /tmp/lockscreen.png
# Pixellate
mogrify -scale 10% -scale 1000% /tmp/lockscreen.png
# Lock screen with the image
i3lock -i /tmp/lockscreen.png
And in the i3 config file:
bindsym $mod+l ~/.config/i3/i3lock.sh
### More integrated notifications with dunst
Since the default desktop environment I installed was xfce4, the notifications
being shown was from them and it were horrible. Instead of that I installed
[dunst](https://github.com/knopwob/dunst).
![dunst notifications](dunst.png)
They are not the best looking notifications but are well integrated with the
system design and are highly customizable, they will change soon enough :)
### Using the media keys for volume with alsa mixer
This was easy since I just need to bind the X media volume up and down to the
alsa mixer control app so I can use the keyboard to control the system volume
easily.
# Media keys
bindsym XF86AudioRaiseVolume exec amixer -q set Master 4%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 4%- unmute
### Using the media keys for media players with playerctl
By default my system didn't recognize the media keys for
play/pause/back/forward for any player but this was the easiest of them all.
Just installed `playerctl` and every app I used until now worked out of the
box. Even the forward/backwards keys for `mpv` which wasn't working for mpv
with mps-youtube on OS X are functional on my linux box!
# Media player controls
bindsym XF86AudioPlay exec playerctl play-pause
#bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
### Removing the title bars for the windows
That was space I didn't need, it may seem stupid but... how often do you look
at the titlebar of the app you're using? Some like the browsers didn't even
have one! So I've removed the titlebars and left only 2px borders for the
application windows.
# Windows without titlebars
for_window [class="^.*"] border pixel 2
### Auto enable floating for pop-up windows
It was really annoying watching a google login window take half of the desktop
just for a moment to login into a service, so every window with the role of
popup is now floating by default.
# Browser popups floating
for_window [window_role="pop-up"] floating enable
### Using a custom i3bar with i3pystatus
Since most of the default information the i3bar was unnecesary I found out
about i3pystatus that allows you to use python modules to customize the i3bar
at will. Below are my config file and the i3bar.py I use for it.
from i3pystatus import Status
from i3pystatus.updates import pacman, yaourt
status = Status()
# Pacman/Yaourt updates
status.register("updates",
format="Updates: {count}",
format_no_updates="No updates",
backends=[pacman.Pacman(), yaourt.Yaourt()])
# Displays clock like this:
status.register("clock",
format="%a %-d %b %H:%M",)
# CPU
status.register('cpu_usage')
# Memory
status.register('mem',
format='{used_mem}/{total_mem}')
# Shows the average load of the last minute and the last 5 minutes
# (the default value for format is used)
status.register("load", color='#00ff00')
# Shows the address and up/down state of enp6s0
status.register("network",
interface="enp6s0",
format_up="{v4cidr}")
# Shows disk usage of /
status.register("disk",
path="/",
format="{used}/{total}G [{avail}G]",)
# Shows pulseaudio default sink volume
status.register("pulseaudio",
format="♪{volume}",)
status.run()
# .config/i3/config
bar {
status_command ~/.config/i3/i3bar.py
position up
}
### Hide the mouse cursor when not needed
Using i3 I rely on the keyboard a lot, so much that sometimes my wireless
mouse turn itself off to save battery due to inactivity. That said, it's
really annoying for me having the cursor over text I'm writing or just sitting
there when I don't need it so I installed
[unclutter](https://wiki.archlinux.org/index.php/unclutter) and running it on
startup was very relieving.
# .config/i3/unclutter.sh
#!/bin/bash
unclutter &
# .config/i3/config
exec ~/.config/i3/unclutter.sh
## What's next?
There are still two weeks pending and even after all this tweaks the
customization is far from over! There are still stuff I miss a lot, like:
* Easily take screenshots with keybinds.
* Better window switching.
* Better dmenu launcher
* Prevent the screenshoter from drawing the area selector on the screenshot taken. (**xfce4-screenshoter**)
* `ctrl`+`e`/`a` for end and start of line global keybinds.
* Use the scratchpad more and try to improve it.
See ya in two weeks!
---
pub_date: 2016-04-27
---
_template: blog/post.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -1,9 +0,0 @@
title: Hello Website
---
pub_date: 2016-11-27
---
author: Felipe Martin
---
body: This is an example blog post. Not much here but that's not the point :)
---
_template: blog/post.html

View file

@ -2,7 +2,13 @@ title: Welcome to Felipe Martin!
---
body:
This is a basic demo website that shows how to use Lektor for a basic
website with some pages and a blog.
Hi! I'm Felipe, and I am a developer. Whatever that is.
I have been playing with code for a while now, but I also enjoy geeking around with computers, algorithms and other stuff; the less I know about it, the better! Learning new things every day is my way of life.
I think that developers are like artists, writers and composers... we all make art. But we don't use strokes and colors, words or notes, we make it through code. And I really love it.
If you want to get in touch, feel free to drop me a line.
---
_template: home.html

View file

@ -0,0 +1,18 @@
Title: Made with open source software
---
body:
Even for a small site like this, is important to use the appropriate tools! This site was made using open source tools some of which are:
* Atom
* Bower
* Emacs
* Gulp
* Lektor
---
_template: open-source.html
---
_discoverable: no
---
title: Made with Open Source

View file

@ -8,22 +8,22 @@ label = Title
type = string
size = large
[fields.author]
label = Author
type = string
width = 1/2
[fields.twitter_handle]
label = Twitter Handle
type = string
width = 1/4
addon_label = @
[fields.pub_date]
label = Publication date
type = date
width = 1/4
[fields.comments_enabled]
label = Comments enabled
type = boolean
default = true
width = 1/4
[fields.tags]
label = Tags
type = string
width = 1/2
[fields.body]
label = Body
type = markdown

View file

@ -6,6 +6,7 @@ hidden = yes
[children]
model = blog-post
order_by = -pub_date, title
slug_format = {{ (this.pub_date|dateformat('YYYY/MM/dd/') if this.pub_date) ~ this._id }}
[pagination]
enabled = yes

View file

@ -1,17 +1,19 @@
<html>
<head>
<title>{% block page_title %}{% endblock %}</title>
<title>{% block page_title %}Felipe Martin{% endblock %}</title>
<link href='https://fonts.googleapis.com/css?family=Antic+Slab' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ '/static/css/style.css'|asseturl }}">
<link rel="stylesheet" href="{{ get_pygments_stylesheet()|url }}">
</head>
<body class="{% block body_class %}{% endblock %}">
<header class="center">
<h1>Felipe Martín</h1>
<h2>Be incomprehensible. If they can't understand, they can't disagree.</h2>
<nav class="main-menu">
<a href="{{ '/'|url }}">About me</a> //
<a href="{{ '/blog'|url }}">Blog</a> //
<a href="{{ '/portfolio'|url }}">Portfolio</a>
<a href="{{ '/'|url }}">/about</a> &nbsp;
<a href="{{ '/blog'|url }}">/blog</a> &nbsp;
<a href="{{ '/portfolio'|url }}">/portfolio</a> &nbsp;
<a href="{{ '/contact'|url }}">/contact</a>
</nav>
<hr class="light">
</header>
@ -22,10 +24,12 @@
<a href="mailto:me@fmartingr.com" target="_blank">E-mail</a> //
<a href="https://telegram.me/fmartingr" target="_blank">Telegram</a> //
<a href="http://es.linkedin.com/in/felipemartingarcia" target="_blank">LinkedIn</a> //
<a href="https://github.com/fmartingr" target="_blank">Github</a> //
<a href="https://twitter.com/fmartingr" target="_blank">Twitter</a>
<a href="https://github.com/fmartingr" target="_blank">Github</a>
</div>
<div class="center text-center">
<a href="{{ "/made-with-open-source"|url }}">Made with Open Source tools</a>
</div>
</footer>
<script type="text/javascript" src="{{ 'static/js/app-min.js'|url }}"></script>
<script type="text/javascript" src="{{ '/static/js/app-min.js'|url }}"></script>
</body>
</html>

View file

@ -1 +1,3 @@
{% extends "_base.html" %}
{% block page_title %}{{ super() }} | Blog{% endblock %}

View file

@ -1,8 +1,17 @@
{% extends "blog/_base.html" %}
{% from "macros/blog.html" import render_blog_post %}
{% block body_class %}blog post{% endblock %}
{% block page_title %}{{ super() }} | {{ this.title }}{% endblock %}
{% block main_content %}
{{ render_blog_post(this) }}
{% if this.comments_enabled %}
<div class="center comments">{{ render_disqus_comments() }}</div>
{% else %}
<div class="center info">
Comments have been disabled in this post, if you want to contact me please <a href="{{ '/contact'|url }}">go ahead</a>!
</div>
{% endif %}
{% endblock %}
{% block body_class %}blog post{% endblock %}

View file

@ -1,6 +1,6 @@
{% extends "_base.html" %}
{% block page_title %}About me // Felipe Martín{% endblock %}
{% block page_title %}{{ super() }} | {{ this.title }}{% endblock %}
{% block main_content %}
<div class="grid center">
@ -8,10 +8,7 @@
<img src="{{ 'static/images/avatar.png'|url }}">
</div>
<div class="col-2-3">
<p>Hi! I'm Felipe, and I am a developer. Whatever that is.</p>
<p>I have been playing with code for a while now, but I also enjoy geeking around with computers, algorithms and other stuff; the less I know about it, the better! Learning new things every day is my way of life.</p>
<p>I think that developers are like artists, writers and composers... we all make art. But we don't use strokes and colors, words or notes, we make it through code. And I really love it.</p>
<p>If you want to get in touch, feel free to drop me a line.</p>
{{ this.body }}
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,9 @@
{% extends "_base.html" %}
{% block page_title %}{{ super() }} | {{ this.title }}{% endblock %}
{% block main_content %}
<div class="center">
{{ this.body }}
</div>
{% endblock %}

View file

@ -1,5 +1,7 @@
{% extends "_base.html" %}
{% block page_title %}{{ super() }} | {{ this.title }}{% endblock %}
{% block main_content %}
portfolio
{% endblock %}