Skip to main content

Posts

Notes on AWS Lightsail

Finally, I'm trying Amazon Lightsail. Just few notes:- 1. The direct console is great. This is basically what EC2 should have, instead of web ssh console. You need this console to verify the ssh key fingerprint before connecting through ssh first time. 2. There's simple firewall manager. Only port 22 and 80 opened by default. Click Manage from the instance menu to get into the firewall manager. 3. Now there's apac region !

A brief look into nginx unit

So nginx has come out with it's own application server that can run multiple types of application from PHP, Python and Go, with more languages support coming soon. Deployment is always my topic of interest  so this kind of news definitely caught my eyes. There's not much technical information yet, other than the official blog post . I'm quite interested to know how the python support being implemented. The Application model also remind me to the Webfaction hosting model and with unit HTTP API, it provide possibility to implement something like Webfaction hosting panel where you can add new application and manage it all through just a web interface. Reading through the source code of python module support, it look like python wsgi application is being executed in-process through python C API (my guess), particularly if you look at the line 337:- result = PyObject_CallObject (nxt_py_application, args); For Go application however it simply execute the Go built-in ...

List of DNS server software

It's been quite a long time I'm not following the recent development in dns scene, especially on the server software itself. In the past, I did try setting up my own BIND installation just to understand how all these things work. I tweet reminded me back:- Best #PowerDNS ni, siap http api. Auto SOA increment. #thorbaek — FryShadow (@FryShadow) August 15, 2017 So what else dns server software we have these days other than BIND 9 ? PowerDNS (as in tweet above). CoreDNS - now also a server type plugin of Caddy. It's a successor of SkyDNS. SkyDNS - SkyDNS is a distributed service for announcement and discovery of services built on top of etcd . Knot NSD

How smart-contract is possible in blockchain ?

The idea was derived from the scripting support in bitcoin. Part of bitcoin transaction contain a Script, a stack based language that will be executed to verify the transaction. Complex conditions can be expressed in this language, which has 80 different opcodes including arithmetic, bitwise operations, string operations, conditionals, and stack manipulation. This language however still pretty limited, such as not having loop and thus not Turing complete. So new blockchain implementation like Etherium expand the idea further to include support for real programming language, thus enabling more complex conditions to the blockchain transaction, which now commonly known as smart-contract . Side note, making bitcoin transaction in python .

How to build your own programming language

I've always fascinated in how programming languages are built and have made it into my 2017's new year resolution to learn building one myself. So here are all the notes collected along the way. My presentation at Malaysia Open Source Conference - How to build your programming language ?  I plan to extend this presentation at upcoming PyCon APAC  in this August with an example in Python. A write up in Malay - Bagaimana bahasa pengaturcaraan dibina ? A series on building simple interpreter in Python by Ruslan Plivak - Let's Build a Simple Interpreter ! A book on writing an interpreter with Go (Golang). I'm still making up my mind whether to buy this or not -  https://interpreterbook.com/ . Free book on building interpreter using Java and then C . This is not complete yet but the author also recommend Interpreter book above in his reply to my reddit's comment. (Updates 2020: It's complete now!) List of reddit's threads related to chapters in t...

My Python Workflow

This is basically what I did whenever starting on new Python project. mkdir project_name cd project_name wget https://bootstrap.pypa.io/bootstrap-buildout.py vim buildout.cfg Where my buildout.cfg look like:- [buildout] parts = main [main] recipe = zc.recipe.egg eggs = python-telegram-bot interpreter = python Then I just execute the following to get my new python environment initialize:- python bootstrap.py ./bin/buildout A python interpreter that already has access to my packages dependencies - in this case python-telegram-bot is ready in ./bin/python . I'm a fan of buildout and shall write more about it in later post.

Trying out Ajenti

Ajenti is server control panel, in the same space as Webmin. It allow you to manage your linux server directy via web interface. In term of installation, Ajenti really win. All available as OS packages, so if using Ubuntu or Debian it just a matter of apt-get. The initial installation is covered by a script that you download from Ajenti's website. wget -O- https://raw.github.com/ajenti/ajenti/1.x/scripts/install-ubuntu.sh | sudo sh One thing that tripped me up is that I thought the web hosting plugins also in the same packages. Turn out it a separate package called ajenti-v (It clearly shown on the website, so my bad). To get the webhosting packages you need to install ajenti-v package. sudo apt-get install ajenti-v ajenti-v-nginx ajenti-v-mysql ajenti-v-php-fpm php5-mysql ajenti-v-python-gunicorn If you have already install apache2 before, you need to remove it as Ajenti-v use nginx. The whole experiences of getting a Django website running is still not very s...