16 Feb'15
Clang fatal error: standard headers not found
In the morning I decided to try building the json11 library. I almost submitted a github issue but then understood that the error quite silly and was probably originating from my broken setup:
$ make test clang++ -O -std=c++11 -stdlib=libc++ json11.cpp test.cpp -o test -fno-rtti -fno-exceptions In file included from json11.cpp:22: ./json11.hpp:53:10: fatal error: 'string' file not found #include <string> ^ 1 error generated. test.cpp:1:10: fatal error: 'string' file not found #include <string> ^ 1 error generated.
As you might see, string is a part of the standard library.
Let …
15 Feb'15
Deploying sample Silex app to Heroku
For the last couple of weeks I met quite a few people who were praising PHP and I had an idea to have a brief look at it once again after more than 4-year break.
I decided to push a sample application to Heroku by following their tutorial but that turned out to be nontrivial on my Ubuntu 14.04LTS. Below I’ll give a brief list of commands that I needed in addition to those provided by Heroku to get the app running locally before pushing it to Heroku.
Initially, we start by naviagiting to the repository and following …
16 Aug'14
Using EOSInfo utility to get your Canon EOS information
You can use these tools to get the information for your old Canon camera. Per platform:
I haven’t found a similar tool for Linux, but you might still be happy to find out that you can [run Linux](http://www.magiclantern.fm/forum/index.php?topic=14847.0) on newer camera versions that have an ARM onboard!
Backup links:
- http://archive.is/3tZlh
- http://archive.is/PCE7U
- https://cloud.berezovskiy.me/index.php/s/ArN9NhpIbezcFhX (for installers)
Updated on 15 Dec‘16.
15 Aug'14
Work-life balance & weekend reading
Links:
- http://www.lindsredding.com/2012/03/11/a-overdue-lesson-in-perspective/
- http://www.economist.com/news/briefing/21611074-how-new-technology-shaking-up-oldest-business-more-bang-your-buck
- http://www.wired.com/2014/08/edward-snowden/
- https://medium.com/@sarahkendzior/the-minimum-wage-worker-strikes-back-fa4c36eb306b
23 Apr'14
Learning GNU screen
I recently started to remotely log into several servers quite often so I felt a need to maintain reliable connections to them and I considered a few choices:
As the beginner, I decided to stick to the easiest option - screen. It comes preinstalled on many server and many administrators install them alongside vim, emacs and git.
I decided to use this blog post for two purposes: to collect the most helpful links to learn screen; and to plan for deeper explorations in future (in this case, Mosh and Tmux).
Useful screen resources
21 Apr'14
Moving Google Drive folder
UPD: My approach was partly successful, because Google Drive still decided to resync all my files after I successfully moved the root folder. If you have any idea what I could’ve missed, you’re welcome to leave a comment below.
Let’s describe what we aim to do: we have Google Drive on our computer in a synced state, but we want to move the whole Google Drive folder to another path (or in case of Windows, most probably - another disk).
All actions described below were performed on Google Drive for Windows (App version: 1.15.6464.0228). Windows …
13 Jan'14
Small plans for January
This is a great year, I hope! So in order to make it great, we need to put some efforts to make it bright.
To strive, to seek, to find, and not to yield- Alfred Tennyson
I have few resolutions for the new year, but nothing earth-shaking:
- healthy rythm
- productive workflow
- more books, less talks
- less artificial, more real (people, meal, entertainment)
- only grow, always move forward
In order to achieve these ambitious goals (I think you shalln’t be deceived by their simplicity), I need to reach some goals:
- migrate to Ubuntu successfully (especially solve dependency on those small …
25 Dec'13
Creating shortcut function in Fabric to create a Pelican draft
I migrated from Wordpress to Pelican few month ago and so far I was satisfied with it, mainly because my demands to the blogging platform are far lower than one might imagine. But as atrue engineer, I always strive to eliminate any duplication in code or in actions.
For this reason I’ve created one more Fabric function that creates a draft for me, properly setting the date and slug for me:
drafts_path = 'content/drafts/'
def draft(title):
from datetime import date
from time import strftime, gmtime
from unidecode import unidecode
import re
from subprocess import call
today_iso = date.today …
03 Oct'13
Pelican on Windows
I enjoy using pelican so for so much. However, few issues hit my mind recently:
- Medium is such a nice place to write that I can merely resist my temptation;
- There is no ability to run person search across the static website;
- I’m tied to UNIX environment in order to run the Pelican development server for preview.
I recalled a great quote:
Once you say you’re going to settle for second, that’s what happens to you in life.
—John F. Kennedy
So I decided to see if it’s possible to resolve all of that issues for …
10 Aug'13
Rename all *.rst files in a directory according to their date
TODO:
- add verbose mode
- move awk output into variable and test if file already begins with a date
#!/bin/sh
for f in $(find ./content/ -name '*.rst'); do
name=$(basename "$f")
dd=$(dirname "$f")
d="$dd/$(cat "$f" | grep ':date:' | awk '{print $2}')-$name"
if [ ! -f "$d" ]; then
mv "$f" "$d"
else
echo "File '$d' already exists! Skiped '$f'"
fi
done