Reset git tree

This commit is contained in:
Cyryl Płotnicki 2022-06-25 08:47:06 +01:00
commit 40545022f6
431 changed files with 4686 additions and 0 deletions

34
.build.yml Normal file
View file

@ -0,0 +1,34 @@
image: nixos/latest
sources:
- https://git.sr.ht/~cyplo/blog
secrets:
- 6c23a8c1-7a30-4a7e-b3b7-0171e898a7d3
- 47d167ed-ef43-4515-9923-6954d34a4fab
oauth: pages.sr.ht/PAGES:RW
tasks:
- fetch_tools: |
cd blog
nix-shell --pure --run 'date'
- github_push: |
set +xv
cd blog
GITHUB_TOKEN=`cat ~/.github_token`
git remote add github https://cyplo:$GITHUB_TOKEN@github.com/cyplo/blog.git
nix-shell --pure --run 'git push github --all --force'
- build: |
cd blog
nix-shell --pure --run 'hugo --gc --minify'
- netlify_publish: |
set +xv
cd blog
export NETLIFY_TOKEN=`cat ~/.netlify_token`
if [ `git branch --contains HEAD | grep -i master` ]; then nix-shell --pure --keep NETLIFY_TOKEN --run 'netlify-deployer master 7a0944f0-cfd0-424b-8252-ca44fc950350 public'; fi
- package: |
tar -C blog/public -cv . > site.tar
gzip --best site.tar
ls -hal site.tar.gz
- sourcehut_upload: |
acurl -i -f https://pages.sr.ht/publish/cyplo.srht.site -Fcontent=@site.tar.gz

1
.envrc Normal file
View file

@ -0,0 +1 @@
eval "$(lorri direnv)"

3
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,3 @@
# These are supported funding model platforms
liberapay: cyplo
patreon: cyplo

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
public/
resources/_gen/

10
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,10 @@
image: monachus/hugo
variables:
GIT_SUBMODULE_STRATEGY: recursive
pages:
tags:
- docker
script:
- hugo

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "themes/beautifulhugo"]
path = themes/beautifulhugo
url = https://github.com/halogenica/beautifulhugo.git

104
LICENSE Normal file
View file

@ -0,0 +1,104 @@
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Section 1 Definitions.
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike.
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 Scope.
License grant.
Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
Term. The term of this Public License is specified in Section 6(a).
Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
Downstream recipients.
Offer from the Licensor Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
Additional offer from the Licensor Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapters License You apply.
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
Other rights.
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
Patent and trademark rights are not licensed under this Public License.
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
Attribution.
If You Share the Licensed Material (including in modified form), You must:
retain the following if it is supplied by the Licensor with the Licensed Material:
identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
a copyright notice;
a notice that refers to this Public License;
a notice that refers to the disclaimer of warranties;
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
ShareAlike.
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
The Adapters License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License.
You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability.
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination.
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions.
The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 Interpretation.
For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.

6
archetypes/default.md Normal file
View file

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

61
config.toml Normal file
View file

@ -0,0 +1,61 @@
baseurl = "https://blog.cyplo.dev/"
languageCode = "en-gb"
theme = "beautifulhugo"
paginate = 7
pygmentsUseClasses=true
pygmentsCodeFences=true
title = "Adventurous Computing"
[taxonomies]
series = "series"
tags = "tags"
[[params.bigimg]]
src = "images/header.jpg"
position = "center top"
[params]
homeTitle = "Adventurous Computing by Cyryl Płotnicki"
keywords = "programming, testing, tdd, rust, golang"
logo = "images/avatar.jpg"
showRelatedPosts = true
rss = true
[[menu.main]]
identifier = "donate"
name = " donate"
url = "https://liberapay.com/cyplo/"
[[menu.main]]
identifier = "blog"
name = "blog"
url = "/posts"
[[menu.main]]
identifier = "about"
name = "about"
url = "/pages/about"
[[menu.main]]
identifier = "projects"
name = "projects"
url = "/pages/projects"
[[menu.main]]
identifier = "talks"
name = "talks"
url = "https://slides.cyplo.dev/"
[Author]
name = "Cyryl Płotnicki"
website = "https://blog.cyplo.dev/"
email = "blog@cyplo.dev"
github = "cyplo"
gitlab = "cyplo"
twitter = "cyplo"
linkedin = "cyplo"
mastodon = "todon.nl/@cyplo"

111
content/pages/about.md Normal file
View file

@ -0,0 +1,111 @@
---
title: "Heya !"
date: 2019-04-08T12:51:40+01:00
draft: false
---
My name is Cyryl and I hope you're having a great day !
## Interesting random tidbits about me
I am [running](https://blog.cyplo.net/posts/2018/05/pair-with-me-on-rust.html) remote pairing sessions, helping people with Rust.
My recent focus is [adding fuzzer](https://twitter.com/cyplo/status/1094606119421521922) infrastructure to their projects.
I started a [blog post series](https://blog.cyplo.net/series/rust-testing-tricks/) on testing in [Rust](https://blog.cyplo.net/categories/rust.html) where I share the tricks I've learned.
I was in both leadership and individual contributor roles, I have respect for all sides involved in the process.
I like testing, I taught various aspects of TDD in an apprenticeship course.
## Day jobs
**Head of Core Engineering** at Form3, _May 2019 - now_
I am responsible for 3 engineering teams, each having its own technical leadership structure. I work closely with product leadership on the vision for the shared services at the organisation and with other team leads and section heads on execution planning. I help with establishing standards across multiple teams while providing architectural and technical support. I review the more sensitive code & documentation contributions. I guide people through their growth as team leaders and individual developers alike.
**Software Engineer** at balena, _October 2018 - May 2019_
I worked remotely on **Rust** crates compiled into NPM packages through the power of **WASM**.
As all of the above is on the bleeding edge - I find, report and fix bugs throughout the ecosystem.
**Software Craftsman** (Consultant) at Codurance, _January 2017 - October 2018_
Helping client teams grow - working within software teams and teaching technical concepts as well as improving the process.
Running workshops (e.g. Legacy Code Retreat, advanced git, **TDD**).
Running **Rust** pairing sessions and intro to Rust workshops.
Facilitating open-space conferences.
Teaching at the apprenticeship programme.
Projects:
- Transportation route planning software for a big retailer, using a graph database (**Gremlin/Apache Tinkerpop**) in Java. Managed deployment to **AWS** via **Terraform**.
- Transaction consolidation software for an investment bank.
- Electronic circuit simulation software for a startup.
**Consultant** at Infusion, _June 2012 - November 2016_
Writing code is still where I spend most of my time, and happily so.
I do that in **Java** and **.Net**, sprinkled with some **C**, **C++**, Python, bash and powershell I gather requirements, talk to the clients, other engineers, figure out solutions together. My particular specialty seems to be taking over legacy code bases and making them shine. I am responsible for a small team of developers.
Projects:
- Pulse - a product for mass remote software installation and monitoring. Used, among others, in demo kiosk installations, phone retail shops and in-flight entertainment systems. Writing server and client code. Largish system working mostly on the backend in .Net, standing on Azure. I'm helping here and there, with the architecture and sometimes doing changes to our **Android** client code as well.
- I've helped build a **distributed** solution for insurance cost calculation for Metlife Japan. Mostly Java, some IBM mainframes and occasional C++.
- I've worked for other financial institutions on distributed software for risk exposure analysis. Mostly .Net, some C++, large in-house computation farms involved.
**Senior Software Engineer**, Power Media S.A., _February 2011 - June 2012_
I was asked to return to Power Media by the head of the whole department, this was quite cool ! I've helped recruit more people and was one of the developers working on the system for TV materials storage. The system was written in **C#**, but I've also took a look inside an **Erlang** one and a one in **Obj-c** as well, from time to time. I've convinced the company to [open source](https://github.com/powermedia/PowerMedia.Common) the core libraries used.
**Mobile Games Developer**, iNTRES/Scoreloop, _December 2009 - February 2011_
I was a part of a team that was tasked with developing a cross-platform, pure C library that provided matchmaking, ladders and other networking capabilities to mobile games, **Pro Evolution Soccer 2011** among others. We've used C89 as the base language.
**Lead Developer**, Power Media S.A., _June 2007 - December 2009_
This was my first experience as a leader. Despite this we've managed to build the new [travelplanet.pl](http://www.travelplanet.pl/) - a website for the biggest trip broker in Poland. This was a .Net job and involved some quite heavy server machinery. Around **60 different data sources** were involved. In the meantime I've also helped with growing the **Erlang** team and got my hands dirty with proof-of-concept **low-level** Mac **PowerPC** programming.
**Software Developer**, Power Media S.A., _June 2006 - June 2007_
My first "real" job ! Maintenance on the in-house systems written in Java. Slowly I got into client-facing project as well. Java, Webobjects.
## Education
**Wrocław University of Technology** 2005-2007
## Books
I am one of the technical reviewers for the "500 lines or less" book, a new entry in the [Architecture of Open Source Applications](http://aosabook.org/en/index.html) books series.
I helped to shape the chapter on Paxos there.
## Talks/workshops - ask me to give some !
The links provided are for the slide decks.
- Working with legacy code utilizing golden master tests
- Fuzzing in Rust
- Mastering Git
- Legacy Code Retreat - running a full-day workshop on test-driving changes in legacy code.
- A secret to secure software (ssshhh it's TDD)
- ["Conferences you did not know existed and now you know you just need to go to"](https://blog.cyplo.net/posts/2016/03/13/conferences.html)
- "Languages are communities" - impromptu talk about how communities are the most important thing when choosing your programming language.
- ["Tor and what it's good for"](https://github.com/cyplo/talks/tree/master/tor_for_beginners)
- ["Erlang for the .Net people"](https://github.com/erlang-wroclaw/erlang_tech_night) - introduction to Erlang with some live coding by me and my friend Fabian
- ["Anatomy of a debugger"](https://prezi.com/hzvnsznfkgwj/anatomy-of-the-debugger/) - very high-level overview of how debugging works
- SMD soldering
- Start your journey with 3D printing
## More to read
I like building tools. Be they physical or software. Something that lasts.
I like teaching - allows me to understand topics in more depth.
I'm good at understanding whole worlds of interactions within software projects.
The people and their needs and then the system architecture, code itself, its execution. Because of that I'm sometimes slow to comprehend new things. I really like trying new things. I like **Rust** quite a bunch and am trying to spread that love - I am a contributor to the core Rust projects. I run my own infrastructure - email, blog, backups.
I ask a lot of questions. I like to be in the understanding of the value of my work. I think there's a big value in sharing. I am really into the open source movement. I like **helping people**. I like electronics. I've assembled a RepRap. I've built a sun-powered backup server. I'm learning PCB design in **KiCad** and CAD via Fusion360. I like debugging. Electronics and software. I have a **CNC** router. I like board and RPG games. Rock climbing. Cycling. Other life activities.
Curious reader might want to follow my blog at [blog.cyplo.net](https://blog.cyplo.net/)
[Email me](mailto:hello@cyplo.net) at hello@cyplo.net - I'm happy to have a chat with you !

View file

@ -0,0 +1,9 @@
---
title: "Projects"
date: 2019-04-08T12:51:40+01:00
---
- [genpass](https://git.sr.ht/~cyplo/genpass) - A simple yet robust commandline random password generator written in Rust. Has an extensive generative test suite, including tests against a Rust port of Dropbox's password strength tester zxcvbn.
- [netlify deployer](https://pypi.org/project/netlify-deployer/) - A Python CLI tool to deploy a website to Netlify using their incremental API client. Not the best code but works like a charm. This blog [uses](https://git.sr.ht/~cyplo/blog/tree/master/item/.build.yml#L21) it.
- [my dotfiles](https://sr.ht/~cyplo/dotfiles/) - all of the settings for all of my machines, automated using Nix
- [bakare](https://sr.ht/~cyplo/bakare/) - work in progress on writing a modern backup solution in Rust

View file

@ -0,0 +1,23 @@
---
title: Google AI Challenge
date: 2010-10-10 20:37:09
tags: [dotnet, ai, google, mono]
category: artificial intelligence
---
It seems that being so much into other programming things I missed the
[Google AI Contest](http://ai-contest.com/) announcement. It's
supercool that they sponsor such challenges but also it's really uncool
[so like warm ?] that apparently I won't have time to participate.
About the challenge itself - it involves working with
[GalconFusion](http://www.galcon.com/fusion/)-like game. Easy to
learn, difficult to master type. As they provide starter packs with a
sample bot it's easy to start. However, getting some decent place would
involve some really long time of good old hard work.
As a side note on .NET being spread around the unix world,  there's a C#
starter pack. Good. After few secs I realised that the code will be run
under antique [Mono 1.2.6](http://www.go-mono.com/archive/1.2.6/),
therefore none of my young C# friends would be there. No type inference,
no linq, no other fancy stuff.  Not good.

View file

@ -0,0 +1,29 @@
---
title: It's raining bullets
date: 2010-10-15 13:12:13
category: games
---
I have always been fascinated by works of Adrian Chmielarz, from the
times of Metropolis Software on. Naturally then, I am following really
closely on the development of
[Bulletstorm](http://www.bulletstorm.com/). Damn, I even hoped to
talk to The Guy or Mieszko Zielinski at the
[gameaiconf](http://gameaiconf.com/>) in Paris, but
[Alex](http://aigamedev.com/) told me that "whoa,
[PCF](http://www.peoplecanfly.com/) are so busy with the new IP that
they didn't have time to come this year, next year they'll be here,
hopefully".
Having something so deeply embedded in your mind that you're always
thinking of it. While you eat, while you talk, in your sleep. That's the
way I do like to work. Reading about making of Bulletstorm gives me
creeps as I do feel their hyperenthusiasm about the thing, I do feel
that they take this game everywhere with them. To dinner, breakfast,
party. That's the way I do like to work.
Now back on track, an interview which triggered this urge to flush my
thoughts here. [Interview with Tanya Jessen](http://techland.com/2010/10/14/origins-tanya-jessen-lead-producer-on-bulletstorm/),
producer at Epic.
People make games so other people can have fun. How selfless.

View file

@ -0,0 +1,47 @@
---
title: VPS adventures part one
date: 2010-10-24 23:40:32
tags: [dmehosting, server, ubuntu, virtualization, vps]
category: server
---
As every person in the software industry I need ways to promote my humble
self. A decent web page and online resume plus a blog maybe are a must
these days. The question remains where to put them.
Previously I had my site published within one of the polish hosting
companies for free, as my friend was involved in its operations. Thanks
[Kajetan](http://www.kajetanwandowicz.com/) for 5 years of support !
And maybe it'd stay that way if not of that desire of mine to tinker and
have control of every aspect of the technology power. Some platform with
ability to boot the system I want up would be appreciated.
Real servers are good when you have a place to put them. And want to pay
electricity bills, provide UPS, KVM, BGP and other three-letter
abbreviations. And oh, I simply don't like the fan noise
anymore. [VPS](http://en.wikipedia.org/wiki/Virtual_private_server)
then it is.
Since I recently made contact with Ubuntu Server edition and liked it
for its simplicity, I started searching for a cheap VPS which supports
the newest Ubuntu. Two googles later I found
[dmehosting.com](http://www.dmehosting.com/). 6$ for 25Gigs of space
and 256MB RAM seemed ok, so I bougth the VPS1 plan. Payment went without
problems, they support PayPal. With 6$ less on my account I was waiting
for them to give me the IP + login & password. I didn't expect that I
would take the whole day long.
My first contact with the machine was that of apt-get update, which
failed. Because of lack of network connectivity. I was logged by ssh to
that machine, so definitely some sort of connectivity had to be in
place. I dug into and found not working DNS servers, so I made VPS
connect to the other ones and everything started working. I jumped into
their 'live' tech support line just to hear that it was really bad of me
to change the resolv.conf and I just shouldn't do that. In the meanwhile
their DNSes went back so I in fact did revert the resolv.conf after all.
It's [OpenVZ](http://wiki.openvz.org/Main_Page>)-based hosting, so
policy of "no-no's" is pretty much embedded in the very system. No
kernel reinstallation. No swap space. No system clock write access. No
clicking too fast in the administration panel. Back to google then my search for VPS
is. Stay tuned for the next part.

View file

@ -0,0 +1,39 @@
---
title: VPS Adventures part two
date: 2010-11-01 14:23:18
tags: [server, tilaa, ubuntu, virtualization, vps]
category: server
---
After some not so pleasurable experiences with the previous VPS hosting
provider I started my search for some other one. This time not only
google was involved but also [aardvark](http://vark.com/) and some of
the "top XX best hosting providers" sites. Two results kept showing up.
[server4you](http://www.server4you.com/) and
[tilaa](https://www.tilaa.nl/). Which one to choose then ? I wanted
to give both of them a chance.
[server4you](http://www.server4you.com/). I really tried to buy a VPS
there and I failed. Lots of forms to fill and no instant money
transfer available. I entered my credit card details only to receive the
email after a day or so stating that they were unable to process my
payment.
[tilaa](https://www.tilaa.nl/). What caught my attention there was
that clean website of them. I like such a design style, as you can also
see it here. Not so cheap, I must admit, but definitely easy to buy.
Payment transfered and after about a minute I had a full access to the
VPS. That's how I like things to work. I am using tilaa's the most
simple VPS plan since then and I am pretty happy with it. Here gathered
are some things I like or don't about its services.
- friendly, responsive staff
- 2x RAM amount of swap space - seems great compared to no swap on other VPSes
- [KVM](http://www.linux-kvm.org/page/Main_Page)- and [qemu](http://en.wikipedia.org/wiki/QEMU)-based, you get full control of your system
- good overall system responsiveness - I experienced occasional lags when using [OpenVZ](http://wiki.openvz.org/Main_Page) virtualization before, there's no such thing here
- they work fast - the day the new Ubuntu 10.10 was released, they had the VPS image ready !
- their motto "We try to be good open source citizens" just convinces me
- the only disadvantage is the price, it's 8.95 euro net montly, it's also easy to miss that info on the site
As I already have a safe place to tinker with my system the real work on
the server configuration begins. Stay tuned for the next episode.

View file

@ -0,0 +1,16 @@
---
title: Hello Sharpdevelop
date: 2010-11-14 13:38:02
category: open source
---
For years I've been involved in the open source community. I encouraged
company managers to use open source solutions, I reported bugs, I did
tests. Since this Monday I am officially a part of
[Sharpdevelop](http://www.icsharpcode.net/opensource/sd/) team,
pursuing the goal of better
[F#](http://en.wikipedia.org/wiki/F_Sharp_(programming_language))
support within the IDE. The project itself made has made a impressive
progress last years, had [MonoDevelop](http://monodevelop.com/)
forked from it and has some pretty good people working on it right now.
What more can I say.

View file

@ -0,0 +1,35 @@
---
title: Netbeans 6.9 for Rails 3 on Ubuntu 10.10
date: 2011-01-29 14:51:07
tags: [linux, maverick, netbeans, ruby, ubuntu]
category: ruby
---
I am a lazy person. I do like things to just work, run out of the box,
name it. I like Ubuntu for it's packaging system and ease of
installation of various software. However using Netbeans from the
default repo could cause you a headache when developing Rails 3 apps.
These just won't run. Let us start with installing the newest version of
the IDE
```bash
sudo apt-get install netbeans
#then go to the Tools->Plugins->Available and install all regarding Ruby
```
Now go ahead and try running some Rails app.
```bash
/var/lib/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require': /var/lib/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/cache/mem_cache_store.rb:32: invalid multibyte escape: /[x00-x20%x7F-xFF]/ (SyntaxError)
```
you say ? Here's a quick fix
```
#edit /usr/share/netbeans/6.9/etc/netbeans.conf
#=> append -J-Druby.no.kcode=true to the the netbeans_default_options and volia
# the whole line im my case goes like that:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.pmoffscreen=false -J-Druby.no.kcode=true"
```
Long term solution ? Wait for Netbeans 7.0 as the devs promised it to be fixed there

View file

@ -0,0 +1,28 @@
---
title: How not to blog
date: 2011-03-27 22:25:23
category: blog
---
Today's post is definitely not a tech one. Or maybe just a bit. It's
about blogging, from the other side of the keyboard. PEBKAC-style.
Fun-fact: Did you know that 'kac' in Polish means 'hangover' ? To the
point. I realised that I have dozens of posts in the state of started
but definitely not finished. Why is that so ? Is it that I am superbusy
with my new work ? Kinda. Is that that I am the guy responsible for the
installation of the sound system in one of the new Wrocław's clubs ?
Sounds pretty serious but still not a perfect excuse. The thing is that
there is no right excuse for not doing something you want to do. Do it
or don't. Don't pretend to. The funny thing is that the smallest
possible posts, like
[this one](/posts/2011/01/29/netbeans-6-9-rails-3-ubuntu-10-10/) brought me
the most views. I don't wanna loose you guys because I don't feel like
blogging recently. Mine unfinished tech posts won't probably make it
because I just don't remember what were these small tech tricks I used
to solve that problems. Not even wrote them down as I was so enlightened
by the superiority of my solutions. Don't do that. Take notes about
everything which you would possibly need and start working on the
sentences and wording. Right now. Go. Hit publish and let the world
know. Thanks go to
[TC](http://techcrunch.com/2011/03/27/why-startups-need-to-blog-and-what-to-talk-about/)
& [Mark Suster](http://techcrunch.com/author/marksuster/).

View file

@ -0,0 +1,43 @@
---
title: Installing MacOSX Server 10.6 on VirtualBox
date: 2011-05-07 14:23:30
tags: [macosx, virtualbox]
categories: [freedom, mac, server]
---
It all started with my work assignment of installing MacOSX Server 10.6
on the XServe rack. Briefly speaking, after debugging some hardware problem
with the CPU temperature meter, I managed to install the base OSX server
system there. After that I needed to set up VMs with 10.6 64bit and 10.4 32bit
on top of that. Why so if already having 10.6 as the base system ?
Simply I wanted to avoid constant reinstallation of the base system, as
the machines are meant to be used for development and testing. Also the
XServe hardware was needed instead of classic blade system to meet Apple
license requirements. Having the internet read twice I decided to give
VirtualBox a try. My way of thinking was that I am already familliar
with that piece of software and know it as a easy to use one. In
addition to being pretty fool-proof it also enables features like operating from the commandline only. So what's the deal ?
Bring up VirtualBox GUI, click on new virtual machine creation button,
choose MacOSXServer, insert the iso file made from the installation dvd
and volia ? Not even remotely close. It appears that Apple has embedded
some kind of valid processors db into the system and checks the
processors present against it on every boot. The only configuration I managed to install
and launch was single-core. Both 32 and 64bit guests seem to be working
fine. But what's the point of having many cores there if only one can be
used per a VM ? Some time after that I found brilliant blog pair by
[prasys](http://prasys.info/) and
[nawcom](http://blog.nawcom.com/). It seems that the latter one
produces what's called [ModCD](http://blog.nawcom.com/?p=446) which
allows booting with the processor checks disabled. Recipe for amd64:
- create new MacOSX vm in VirtualBox
- change it to non-EFI type
- boot ModCD
- swap iso image for the one with the MacOS install
- press f5
- type -force64
- press enter
For me the installer crashed on the last step before reboot, but then it
rebooted successfully and continued on with the installation. Don't
forget to donate to nawcom if you can.

View file

@ -0,0 +1,31 @@
---
title: Speeding up Eclipse/Aptana
date: 2011-05-23 12:29:49
tags: [aptana, eclipse, java]
category: open source
---
As you know Aptana is Eclipse. And Eclipse is a Java-based IDE
which means it's not particularly a speedy one. However if you have a
decent amount of ram, like 4gb, it's fairly easy to speed the Eclipse
up. Find `eclipse.ini` or `aptana.ini` or other file which
contents look similar. These settings are from my Linux box - I know that
MacOS can get scared by higher values there; if you encounter any problems - try lowering the `Xmx`
and/or others.
```
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Xms128m
-Xmx2048m
```
These settings are for the 4gb ram box, try to find the ones which suit you best. `MaxPermSize`
stands for the maximum amount of the memory to be used by the Java
internals, `Xms` gives the amount of heap allocated on the VM start and
`Xmx` is the heap size limit. Start by upping `Xms` value as it's often
too small which causes the Java VM to make lots of heap resizes on the
app start.

View file

@ -0,0 +1,48 @@
---
title: How to hire a programmer, a.k.a. tech recruitment explained
date: 2011-07-24 20:31:55
tags: [recruitment]
category: hopefully influential
---
Todays post is not a recipe at all. Heres what I think the tech recruitment should look
like. It wont be cheap. Start by describing the position. Who are you looking for,
what would they do for you, how would they bring money to your company.
Use words, not techie talk. I found most of the job descriptions online
do not match the real expectations of the employer. You just want a good
programmer, a person who thinks about what they does. It really doesnt
matter if they know Haskell and you write in Erlang. I doesnt matter if
they think in asm when youre looking for Forth. I doesnt matter if
they are Linux nerds and youre Windows-only, if they know how
computers work. As long as they think about what they do and agree with your goals, thats perfectly fine. If you
translate your desire for a good programmer into a bulletpoint list of
tech words you dehumanize it. Dont look for skillsets, look for people. How to check whether someone is a good programmer then ? How to
score people against such a vague job description ? You dont score
people, you just sort the set of people. Start by a rather loose
conversation. Tell me about the point in life youre in, tell me
something about what fascinates you in the programming and finally
whats your motivation for changing the job and why do you want to work
with us ? Somewhere in the middle I ask about the projects, what
technologies you do like, what not, why not. Do you feel comfortable
teaching others ? If someone is fascinated by
The Machines you're noticing it by now. Same with
boring people or annoying people. If you do not want to work with them
then do not hire them. Even if theyre brilliant. How does the computer
work then ? How does this happen that I have this text file full of
strange writings and suddenly they make the computer do stuff ? Why its
not a good idea to get the modern pc to fly a space shuttle ? Whats a
stack and whats a heap ? Is the stack memory different from the heap
memory ? Why so. And the why. The most important question for me is the
mighty why. Not only should they understand how something works, but
more importantly why it works like that. I enjoy working with people who
are microwave-curious than the hex-feared ones. How does the microwave
oven heat things ? Does the DEADBEEF scare your ? Talk with people, make notes. What annoys you, what
impresses you. Do the exercises with them. Ask them how would they solve
a simple but a reallife problem. Design the solution with them. The more
lifelike the work scenario the better. Do the things youd normally do
with your work colleague. And order the set of candidates. Work as the
simple max function. Decide
which one seems better suited for you. Then take the next one and
compare her to the current max. And please hire people only when youre
ready to hire them. UPDATE. After writing this post I've stumbled onto
this [37signal's article](http://37signals.com/svn/posts/2628-how-to-hire-a-programmer-when-youre-not-a-programmer)

View file

@ -0,0 +1,20 @@
---
title: Ubuntu 11.10 Beta1
date: 2011-09-22 09:40:22
tags: [ubuntu]
category: linux
---
What do I think ? Easy to install, hard to disable Unity, some programs crash sometimes and some things are weird. Despite that I have the faith in the Ubuntu folks that the system would be ready when 11.10 comes.
As whining itself never got anybody anywhere, I've reported all of these here:
[#855901](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/855901)
[#834425](https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/834425)
[#855945](https://bugs.launchpad.net/ubuntu/+source/unity-2d/+bug/855945)
[#855917](https://bugs.launchpad.net/ubuntu/+source/empathy/+bug/855917)
[#855919](https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/855919)
I've even got one OOPS. However, since I'm writing this post under
11.10, it seems usable, even the OOPS was not of disturbance as it got
nice GUI window displayed and no system crash then.

View file

@ -0,0 +1,34 @@
---
title: Configuring Tor non-exit relay
date: 2011-10-06 15:33:49
tags: [tor]
---
I'm for privacy. I'm for cryptography. I do provide
[Tor](https://www.torproject.org/) relays for the good of all people.
Here's how to configure a classic non-exit Tor relay on your machine. In
my case I got it running on the VPS server, with 2 IP addresses and some
bandwidth quota applied. I wanted the Tor traffic to be easily
recognizable from outside as different from the 'normal' traffic coming
from my server. Second requirement was to make Tor not use my whole
traffic quota up. Here's my config, with some notes
```
cyryl@serv:~$ cat /etc/tor/torrc
SocksPort 0 # what port to open for local application connections
SocksListenAddress 127.0.0.1 # accept connections only from localhost
RunAsDaemon 1
DataDirectory /var/lib/tor
ORPort 9001 #switches Tor to server mode
ORListenAddress tor.cyplo.net
OutboundBindAddress 91.213.195.28 #what IP address use to direct the outbound traffic
Nickname cyplonet
Address tor.cyplo.net
ExitPolicy reject *:* # no exits allowed
AccountingStart day 09:00
AccountingMax 2 GB
MyFamily cyplonethome, cyplonet
```

View file

@ -0,0 +1,19 @@
---
title: Disassembling Pioneer SE-50 headphones
date: 2011-12-20 11:12:11
tags: [hardware, repair]
---
Today's story is a photostory ! Here's how to disassemble Pioneer SE-50
headphones, as I found this task quite difficult, mainly because no info
available on the internet on how to open the can from the back. As you
can see Pioneer signs on the side of each can are removable. Take them
off to uncover the screws. Research made possible by
[kabanosy](http://en.wikipedia.org/wiki/Kabanos) - best multitool
ever. Some more info on the headphones: [scan of the user manual](/pdf/disassembling-pioneer-se-50/se-50-b-user-manual.pdf)
Produced between '68 and '72.
Two speakers per can !
Photos taken after replacing the cable and before pots rejuvenation.
Enjoy :)
{{< gallery dir="/galleries/disassembling-pioneer-se-50" />}}

View file

@ -0,0 +1,61 @@
---
title: Bitcoin wallet recovery using Photorec
date: 2012-04-01 21:06:01
tags: [bitcoin, recovery]
category: linux
aliases:
- /2012/04/01/bitcoin-wallet-recovery-photorec/
- /posts/2012/04/01/bitcoin-wallet-recovery-photorec/
---
Ever cried over damaged disk holding your bitcoin wallet ? Ever
formatted storage holding a perfectly valid and the only copy of your
wallet.dat ? Yes, me too. Well, there's
[Photorec](http://www.cgsecurity.org/wiki/PhotoRec), an opensource file
recovery software. It just skips the partition and filesystem info and
scans for plain file signatures on the disk. Unfortunately it does not
recognize Bitcoin's Wallet as a file format. Bitcoin wiki
[states](https://en.bitcoin.it/wiki/Wallet) that wallet.dat is just a
good old BerkeleyDB. Just let me check that with the famous `file`
command:
```
[cyryl@uglybook ~]$ file .bitcoin/wallet.dat
.bitcoin/wallet.dat: Berkeley DB (Btree, version 9, native byte-order)
```
That is right. Photorec however, has its own file-type
detection magic. Let's see whether it works on the wallet.
```
[cyryl@uglybook ~]$ fidentify .bitcoin/wallet.dat
.bitcoin/wallet.dat: unknown
```
Uhoh. Do not abandon hope for not all is lost ! Photorec [provides a
way](http://www.cgsecurity.org/wiki/Add_your_own_extension_to_PhotoRec)
for you to add custom signatures. The only missing ingredient appears to
be the knowledge possed by the `file` command. Just check your linux installation for
`file`'s detection signatures. On my system these are to be found
under `/usr/share/misc/magic`. We need file extensions, offset and some
magic number for Photorec to work. Well, extension is `.dat`, magics
and offsets are stored in the file mentioned above. Translate offsets
from decimal-based to hexs and take care of endianess and done :)
```
[cyryl@uglybook ~]# cat .photorec.sig
dat 0x0 0x00061561
dat 0x0 0x61150600
dat 0x0 0x00053162
dat 0x0 0x62310500
dat 0xc 0x00061561
dat 0xc 0x61150600
dat 0xc 0x00053162
dat 0xc 0x62310500
dat 0xc 0x00042253
dat 0xc 0x53220400
dat 0xc 0x00040988
dat 0xc 0x88090400
```
That is it. Happy wallet recovery.

View file

@ -0,0 +1,31 @@
---
title: Enabling wireless on Dell Latitude 2110 under CrunchBang Linux
date: 2012-07-08 09:18:59
tags: [BCM43224, crunchbang, dell, linux]
category: linux
---
Update:
**Please note that I no longer host this kernel as it is very old and also Crunchbang is no more.**
Some time ago I got my hands on [CrunchBang Linux](http://crunchbanglinux.org/) distro, which is great. The only thing there that could be better is that my Broadcom BCM43224 WiFi card is not working. But I'm used to it, as many
Linux distros do not provide it. As I happen to
know from my Fedora experiences that it is resolved in kernel version
3.4 . Also as that kernel tends to be generally faster on my machine, I
decided to compile just this one. Here you are. [Vanilla 3.4.4](http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.4.4.tar.bz2)
kernel, [compiled](http://crunchbanglinux.org/forums/topic/18060/how-to-compile-the-kernel-from-source/)
for Intel Atom and with BCM43224 support. This is a 64bit kernel.
Download [crunchbanglinux-kernel-3.4.4-intel\_atom.tar.bz2]
and:
```
dpkg --remove firmware-linux
dpkg --remove firmware-linux-nonfree
tar jxf crunchbanglinux-kernel-3.4.4-intel_atom.tar.bz2
cd linux-3.4.4-intel_atom/
dpkg -i *.deb
reboot
```
Should work for Debian Squeeze also but not tested on that system. Email me if you'd
like it compiled any other way, e.g. for another processor.

View file

@ -0,0 +1,14 @@
---
title: Boosting your WiFi signal with cooking utensils
date: 2012-08-01 18:13:31
tags: [hardware]
category: hardware
---
I love cooking and well made utensils. That is a part of the
solution. And the problem ? Boosting WiFi signal. Get WiFi USB dongle
and put it where the bowl's focal point is. Or near it, wherever you get
strongest signal boost. I get up to 2x stronger reception with the
antenna presented.
{{< figure src="/images/boosting-your-wifi-signal/IMG_0230.jpg" position="center" >}}

View file

@ -0,0 +1,79 @@
---
title: How to build minimalistic REST server in .Net
date: 2012-11-01 13:22:39
tags: [dotnet]
category: programming
---
Install "Microsoft ASP.NET Web API Self Host" and all of its
dependencies via NuGet.
```csharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.SelfHost;
namespace resttest
{
public class ExampleData { public int Id { get; set; } }
public class ExampleController : ApiController
{
// /api/job
public IEnumerable<ExampleData> Get()
{
return new List<ExampleData>()
{
new ExampleData(){ Id = 2 },
new ExampleData(){ Id = 4 }
};
}
// /api/job/3
public ExampleData Get(int id)
{
return new ExampleData() { Id = 3 };
}
}
class Program
{
static void Main(string[] args)
{
var configuration =
new HttpSelfHostConfiguration("http://localhost:1337");
//Setup the routes
configuration.Routes.MapHttpRoute(
name: "DefaultApiRoute",
routeTemplate: "api/{controller}/{id}",
defaults: new
{ controller = "ExampleController", id = RouteParameter.Optional }
);
var server = new HttpSelfHostServer(configuration);
server.OpenAsync().Wait();
Console.Out.WriteLine("Press ESC to quit");
do
{
while (!Console.KeyAvailable)
{
Thread.Sleep(256);
}
} while (Console.ReadKey(true).Key != ConsoleKey.Escape);
}
}
}
```
We can launch it and query it using any http-enabled client:
`$ curl http://localhost:1337/api/Example [{"Id":2},{"Id":4}]`
Happy hacking !

View file

@ -0,0 +1,24 @@
---
title: I bought a book
date: 2012-12-22 15:20:47
tags: [books]
category: books
---
I bought a book I didn't read before. On the Internet. Paying person I
don't personally know, basing on his reputation only. Believing he would
send me a paper copy of his words from the remote land I've never even
visited. On the other hand he trusted me to write this review and gave
me the discount for the very fact. And yet everything worked out pretty
well. I transferred the money, got the book, read it and I'm writing the
promised review right now. How is that possible ? How does people trust
each other in this "trust no one" place of the 'nets ? [Liars and
Outliers](http://www.amazon.com/gp/product/1118143302/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1118143302&linkCode=as2&tag=cyplonet-20)
tries to answer that questions. Is this a good read, breathtaking one ?
No, I sometimes struggled to get through. Does it need to be so
intriguing though ? Also no. It is a solid collection of examples on how
does the trust work in our societies and where it did all come from. It
tries to categorize the situations in which trusting is needed and
provides a look into how such can be exploited by some. If you are even
somewhat interested in the cogs moving the society, this book might turn
some of your implicit, intuitive knowledge into explicit one.

View file

@ -0,0 +1,8 @@
---
title: 29c3
date: 2012-12-28 14:21:10
tags: [CCC]
category: freedom
---
{{< gallery dir="galleries/29c3" />}}

View file

@ -0,0 +1,22 @@
---
title: Laptop I'd love to buy
date: 2013-01-15 17:12:50
category: hardware
---
- support for 16GB of RAM
- contact smartcard reader
- ~2kg weight
- 11-14" matte, non-glossy screen
- good keyboard, with separate [home], [end], [insert], [delete]
buttons
- screen resolution of >=1440
- HDMI
- at least 2x USB2.0 and 1x USB3.0
- no optical drive
- no thunderbolt
- no firewire
- TPM
- HSDPA modem
Is there something similar that you recommend for me to buy/build ?

View file

@ -0,0 +1,14 @@
---
title: Erlang Tech night
date: 2013-03-06 18:41:34
tags: [erlang, talk]
category: talks
---
I recently gave a two hours presentation on Erlang 101 along with
[Fabian](http://fabiankrol.com/). Because of the generous support
from Infusion I was able to speak at Institute of Computer Science at
University of Wroclaw. The event was a blast, and that is an opinion of
the people other than me also ;) Thanks for everyone who was there and
you can find the code and slides on
[github](https://github.com/erlang-wroclaw/erlang_tech_night)

View file

@ -0,0 +1,23 @@
---
title: Assembling RepRapPro Mendel
date: 2013-03-23 11:36:49
tags: [3d printing, hardware]
category: hardware
---
It was December, 3D printing fever struck me. Here is the first day of
me building ReprapPro Mendel printer.
{{< gallery dir="galleries/assembling-reprap/1" />}}
Second day of building. Fun fact: you can see the daylight come and go ;)
{{< gallery dir="galleries/assembling-reprap/2" />}}
Next few days - Featuring hotbed and plastic extruder !
{{< gallery dir="galleries/assembling-reprap/3" />}}
Yet another few days - Hot header installation, lots of wiring, tests and... it's alive !
{{< gallery dir="galleries/assembling-reprap/4" />}}

View file

@ -0,0 +1,54 @@
---
title: Building NAS - hardware
date: 2013-03-31 20:27:52
tags: [nas, hardware]
category: hardware
---
For a long time I've wandered the voids of the intertubes in search for
the parts for my NAS/backup/home server solution.
Online backup solutions are fine to some extent, however, someone else
than you then is going through that cat picture collections of yours and
other private stuff. Also the cloud tends to not be the cheapest option
possible.
## Case
{{< figure src="/images/building-nas-hardware/Node304_nocover-top-view_lores.jpg" postition="center" >}}
The need for moar virtual disk space calls for moar physical disk space.
To build any reasonable RAID solution you need 4-5 disks at least, plus
maybe one for system disk. That is a minimum of 6 disk slots in the
computer case. As I have quite some variety of disks laying around I'd
like this case to have an option for using either 3.5" or 2.5" disks.
Ah, and the whole thing should not take big amounts of space. Hence
["Node 304" by Fractal Design](http://www.fractal-design.com/?view=product&prod=94).
Although I intend my NAS to be fanless in the future, I couldn't resist
to leave the  original fans connected. These are beautiful, supersilent,
hydraulic bearing fans, all included in the Node's package.
There are really only two things that you need to be wary of: metal
where the screwholes are is very soft and it is easy to damage - and
that if you have a PSU without detachable cables you're going to have
bad time fitting these inside.
By the way, other small but nice thing is a user manual for this case.
Nice paper, nice clean print and friendly attitude. Attention to details
!
## Motherboard
{{< figure src="/images/building-nas-hardware/lkpq2whHjMbzUSAU_500.jpg" postition="center" >}}
What board supports at least 6 SATA disks, has low power consuption and
fits into miniITX format ? Easily obtainable in central Europe ? And not
super expensive ?
It took almost 3 months for me to find it, I present to you [Asus P8H77-I](http://www.asus.com/Motherboards/P8H77I/). All the usual stuff, most of it I don't need, frankly and not so low on power, but hey - 6 SATA in miniITX.
One caveat - it needs 2 power cables connected to function. The
usual 24-pin EATX and also 4-pin ATX 12V also called P4. What if your
PSU has only those fancy new EPS8 and EPS6 as mine do ? Fear not,
connect half of the EPS8 into P4 port and everything shall be okay.

View file

@ -0,0 +1,116 @@
---
title: Building NAS - software
date: 2013-05-26 21:32:07
tags: [nas, linux]
category: server
---
## Operating system
I think my NAS box build is no longer in much flux, so I thought it'd be
nice to describe it. I had some disks laying around, I had them
installed and started playing with the software setup.
```
Disk /dev/sda: 60.0 GB, 60022480896 bytes
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
Disk /dev/sdc: 160.0 GB, 160041885696 bytes
Disk /dev/sdd: 250.1 GB, 250059350016 bytes
Disk /dev/sde: 500.1 GB, 500107862016 bytes
```
First one is an SSD drive, I used it for OS
installation.  I went for [Crunchbang](http://crunchbang.org/) as I
was already familiar with it, however now I'm thinking of just getting
newest Debian there, as it's finally released. Nothing fancy about the
OS, a regular install really.
```
storage# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 53G 2.4G 48G 5% /
/dev/sda1 461M 31M 407M 7% /boot
```
As you can see `/` filesystem takes little amount
of space, hence the next thing I plan on doing is actually move `/` to
USB3.0 pendrive and then free the SATA drive from it's current duties.
I'm reluctant to do so right now, as moving swap to pendrive might
result in significant wear. I'm thinking of getting more RAM and then
getting rid of the swap at all. These stats were acquired after reboot,
there are some loads under which I saw swapping occur.
```
storage# free -m
total used free shared buffers
Mem: 1636 282 1354 0 53
-/+ buffers/cache: 166 1470
Swap: 1903 0 1903
```
## Software + configuration
NAS means SAMBA, right ? That's what I thougth. RAID5 + SAMBA for Win
clients and NFS for others. After a while I got accustomed to this setup
and started playing with my photo collection as it was laying on NAS.
The problem ? I deleted one photo and wanted it back. It was nowhere to
be found. RAID5, although having internal copies for resiliency, was
visible as one drive only and happily deleted the data when asked to.
What I really needed was a backup solution, not a NAS. My final answer
to that:
```
storage# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 53G 2.4G 48G 5% /
/dev/md0 294G 36G 243G 13% /mnt/array_back
/dev/sde1 459G 35G 401G 8% /mnt/array_front
storage# cat /etc/fstab
#
/dev/mapper/vg_storage-root / ext4 errors=remount-ro 0 1
UUID=b9d32208-edc0-4981-ab74-5da1e7348a1a /boot ext4 defaults 0 2
/dev/mapper/vg_storage-swap none swap sw 0 0
/dev/md0 /mnt/array_back ext4 defaults 0 2
/dev/sde1 /mnt/array_front ext4 defaults 0 2
storage# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Sun Apr 21 22:47:38 2013
Raid Level : raid5
Array Size : 312318976 (297.85 GiB 319.81 GB)
Used Dev Size : 156159488 (148.93 GiB 159.91 GB)
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 33 1 active sync /dev/sdc1
3 8 49 2 active sync /dev/sdd1
```
One disk `[sde]` serves as a front for all user operations. After a while, all changes
except for deletions are being flushed onto `[array_back]` which is a
RAID5 matrix.
```
storage# cat /etc/cron.daily/90_sync_front_to_back
#!/bin/bash
rsync -avr /mnt/array_front/ /mnt/array_back/back
```
## Secret sauce
[ownCloud](http://owncloud.org/). `[array_front]` is not directly
exposed via SAMBA or NFS, it's governed by ownCloud instance, and then
only ownCloud sync client on the computer or phone gets to mess with the
data. By having such setup I get 3 copies of each file. One on device,
one on the front array and one on the back array. What is also cool
about ownCloud is that it also handles contacts and calendar storage for
me. One more step towards getting all my data off google ! Points for
improvement:
- `[array_front]` is not an array now. It's just a disk. Make it an
proper disk array.
- encrypt the data from array_back and send it to S3 and then let it
graduate to Glacier

View file

@ -0,0 +1,13 @@
---
title: How to remove multiarch in debian 7
date: 2013-06-13 09:04:37
tags: [debian, linux]
---
Just a quick one, for me to remember and for you to enjoy.
```
dpkg -l | grep :i386 | cut -s -d ' ' -f3 | xargs apt-get remove -y
dpkg --remove-architecture i386
apt-get update
```

View file

@ -0,0 +1,97 @@
---
title: Automating running Debian in VirtualBox
date: 2013-07-16 14:22:47
tags: [linux, debian, virtualbox]
category: server
---
I'm experimenting with service separation by having each service run in
its own operating system, all of the sharing hardware though. Why ?
Separation seems to be the only secure approach to running any software.
Check [Joanna's](http://theinvisiblethings.blogspot.com/) blog out. I
went with VirtualBox on Debian 7 host, with, well, Debian 7 guests.
First I've prepared template VM by creating a new VM and just proceeding
with install. Then I tried spawning some clones of that, but having it
done manually takes quite some time  and is error prone. Did somebody
say automation ? Yes ! First, clone a VM, regenerating MAC addresses and
making sure the resource caps are good:
```
vmrunner@storage:~$ cat prepare_vm
#!/bin/bash
set -e
if [ $# -ne 2 ] ; then
echo "usage: $0 vm_name vm_number"
exit 0
fi
VM_NAME="$1"
RAM_AMOUNT="128"
DISK_SIZE="2000"
VM_NUMBER="$2"
RDP_PORT=$(($2+3389))
EXECUTION_CAP="50"
VBoxManage clonevm fresh.cyplo.net --name $VM_NAME --mode machine --register
VBoxManage modifyvm $VM_NAME --vrde on
echo "setting RDP listening port to $RDP_PORT"
VBoxManage modifyvm $VM_NAME --memory $RAM_AMOUNT
VBoxManage modifyvm $VM_NAME --vrdeport $RDP_PORT
VBoxManage modifyvm $VM_NAME --nic1 bridged --bridgeadapter1 eth0
VBoxManage modifyvm $VM_NAME --pae on
VBoxManage modifyvm $VM_NAME --cpuexecutioncap $EXECUTION_CAP
VBoxManage modifyvm $VM_NAME --hpet on
VBoxManage modifyvm $VM_NAME --hwvirtex on
VBoxManage modifyvm $VM_NAME --pagefusion on
VBoxManage modifyvm $VM_NAME --dvd none
VBoxManage modifyvm $VM_NAME --autostart-enabled on
VBoxManage modifyvm $VM_NAME --macaddress1 auto
VBoxManage modifyvm $VM_NAME --macaddress2 auto
echo "vm set up, listing all VMs:"
VBoxManage list vms
```
Then run the VM and change it into Debian
service host with new name and some software:
```
vmrunner@storage:~$ cat kickstart_debian
#/bin/bash
set -e
if [ $# -ne 2 ] ; then
echo "usage: $0 new_hostname new_domainname"
exit 0
fi
NEW_HOSTNAME="$1"
NEW_DOMAINNAME="$2"
NEW_FQDN="$NEW_HOSTNAME.$NEW_DOMAINNAME"
aptitude update
aptitude dist-upgrade -y
aptitude install vim atop sudo -y
hostname
ifconfig
set -v
echo "$NEW_FQDN" > /etc/mailname
echo "$NEW_HOSTNAME" > /etc/hostname
sed -i "s/dc_other_hostnames\='.*'/dc_other_hostnames='$NEW_FQDN'/g" /etc/exim4/update-exim4.conf.conf
sed -i "s/127\.0\.1\.1.*/127.0.1.1 $NEW_FQDN $NEW_HOSTNAME/g" /etc/hosts
rm /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
reboot
```
The script above needs to be run on guest, I'm using scp with known ssh keys to upload it and
then run via ssh. This step is to be automated in the future. Points to
improve:
- updating all the guests at once [Chef?]
- monitoring all guests at once [Nagios?]
Summarizing, I'm now running a Tor node, file server, caldav, carddav
and some other services on my home server. All of them in separate VMs.
And it's running quite well with 2GB of RAM. For more info on my home
server build check its
[hardware](/posts/2013/03/31/building-nas-hardware/) and basic
[software](/posts/2013/05/26/building-nas-software/).

View file

@ -0,0 +1,52 @@
---
title: New laptop
date: 2013-08-10 10:45:20
tags: [linux, hardware]
category: hardware
---
Hey, remember my [search for the new laptop](/posts/2013/01/15/laptop-would-love-to-buy/) ?
It's finally over ! I found that Clevo, Taiwanese custom laptop
manufacturer, has recently added 13'3 FullHD laptop base to their
offerings - W230ST. And to my surprise - there is a [Polish importer](http://www.bluemobility.pl/) which allows pretty neat specs
calibration for you. Game on you say ? Indeed.
## What I like about it:
- Haswell-based, so all the new tech is here, same as in the newest
MacBooks
- up to 16GB RAM, I have 8GB installed for now and it works pretty good
- 2x mPCIx mSATA capable slots
- nice copper cooling inside
- FullHD matte display
- 4x USB
- HDMI
- typing on its keyboard, just clicks with me
- survived [OHM2013](https://ohm2013.org/site/) camp - not scared of
humidity and hot air
## What I do not like so much:
- Haswell-based, so Linux support is not that great yet, everything
seems to be working okay, however power consumption is off the
limits. 60Wh battery lasts for ~2h tops.
- while the outer side of the case is of nice rubberrized plastic, the
inside is cheap-looking grey one. There was no option to change it
unfortunately, while I see that [other](http://www.xoticpc.com/)
importers/assemblers around the world have such mods avaiable.
- the looks of the keyboard, purely visual stuff like the font used to
print the characters, the layout is okay
## Running Linux on it:
Everything seems to be working by default on
most of the distros. I've tested Gentoo, Arch, Fedora and Crunchbang.
The only thing that needed some tweaking was that by default I was
unable to control backlight brightness at all. Adding `acpi_backlight=vendor` to the kernel boot parameters, as suggested
on [Arch wiki](https://wiki.archlinux.org/index.php/Intel_Graphics#Backlight_not_fully_adjusting.2C_or_adjusting_at_all_after_resume.),
solved the problem. I haven't delved deeply into Optimus yet, so I don't
know whether the graphics cards switching works correctly or not. The
one thing I've noticed is that, after waking from deep sleep, so after
leaving the lid closed for a long time, not for few minutes, there are
some visual artifacts on screen. Also, as mentioned before, power
consumption worries me a bit. Will keep you posted !

View file

@ -0,0 +1,21 @@
---
title: Idea for a curated links directory
date: 2013-09-02 18:47:15
---
I read a lot. Of books and news alike. Oh, and whitepapers too. And some
recipes maybe. Some of them I find by my RSS reader. Some are given to
me by colleagues at work, some arrive by mail, sometimes even in
somewhat curated, described form. I read through most of them. And
resend. Often I want to share a particular piece with friends of mine
and possibly some other people too. Most often I do this by pasting the
link into the IM window or email it to a particular person I know might
be interested. Then I recall the other person who would also love to
hear about this. Then I need to search the IM logs or my Delicious. And
all of this only to hear that the people mentioned did not have the time
to read the article referred but would love to in the future. Just not
right now. I need a system for this. I read something, I archive it in
the system. People sign up or I do sign them up. People receive my
curated links list in a more or less regular email. But there is also a
public, searchable web directory for all the previous editions. Is there
anything like it around ? Open source please. Selfhosted please. If not - I'm just gonna write it.

View file

@ -0,0 +1,24 @@
---
title: Debuggers - how do they work ?
date: 2013-09-18 17:26:26
tags: [talks]
---
I gave a talk [yesterday](http://www.meetup.com/wrocnet/events/138787702/). It was
on
[debuggers](https://prezi.com/hzvnsznfkgwj/anatomy-of-the-debugger/).
From VM-level debuggers to JTAG, quite a packed, high level overview. In
fact I gave it
[before](http://www.meetup.com/KGD-NET/events/113593522/) on another
occasions. And this time was different, hence this post. The thing I am
particularly proud of is that I was able to entertain the crowd for the
first half of an hour despite not having any computer launched and
connected. You know, like, interacting with actual people ! We had some
difficulties connecting to a beamer so I thought it'd be good to have an
open discussion first. We've started with "unit tests vs debuggers". Is
having a rock solid unit tests suite enough for you to never touch a
debugger ? After some time I've transitioned to my presentation, talked
a bit about the history of debugging, then what are the features of
modern debuggers and finally how all of these work. And while we're at
it I would like to give a shout out to the organizers of these 2 events.
Thanks !

View file

@ -0,0 +1,18 @@
---
title: New dotfiles repository
date: 2013-10-26 10:35:52
tags: [cygwin, dotfiles, linux, mac, vim]
category: open source
---
Hi ! Just letting you know that I've been working for some time on
structuring my dotfiles and finally published them to
[github](https://github.com/cyplo/dotfiles). These contain e.g. my
[vimrc](https://github.com/cyplo/dotfiles/blob/master/.vimrc) and
[font](https://github.com/cyplo/dotfiles/tree/master/.local/share/fonts)
[configs](https://github.com/cyplo/dotfiles/tree/master/.config/fontconfig/conf.d).
I've [patched](https://github.com/cyplo/vim-colors-solarized)
the famous [solarized](http://ethanschoonover.com/solarized) theme
for vim to allow better
[gitgutter](https://github.com/airblade/vim-gitgutter) symbols
display. Enjoy !

View file

@ -0,0 +1,106 @@
---
title: Booting Gentoo with LUKS+LVM2+systemd
date: 2013-11-10 21:20:26
tags: [gentoo, linux, luks, systemd]
category: linux
---
I've spent quite some time recently trying to get a laptop running
Gentoo boot from an encrypted partition with LVM. I thought that this
might be useful for someone else, so here you are: First things first:
I'm assuming you've followed Gentoo handbook and are operating from
within livecd's shell. You've done the regular luksFormat + lvm stuff
and you've come up with a layout similar to this one:
```
dagrey ~ # lsblk
NAME SIZE TYPE MOUNTPOINT
sda 55.9G disk
└─sda1 55.9G part
└─crypthome (dm-3) 55.9G crypt /home
sdb 29.8G disk
├─sdb1 485.4M part /boot
└─sdb2 29.4G part
└─root_sdb2-vg-root (dm-0) 29.3G crypt
├─vg-swap (dm-1) 8G lvm [SWAP]
└─vg-root (dm-2) 21.3G lvm /
```