Journey to Functional Programming

Dulu, dulu sekali. Saya pernah mencari tentang apa saja hal yang harus saya pelajari agar saya bisa lebih ahli dalam pemrograman Python. Lalu secara tidak sengaja saya menemukan jawaban di stackoverflow yang menyarankan untuk membaca buku Real World Haskell. Di sinilah perjalanan saya menuju Functional Programming dimulai. And the journey begin~ Saya sempat mempelajari Scala di tempat saya bekerja, hanya saja saat itu pekerjaan saya dipindahkan kembali ke pekerjaan yang menggunakan bahasa Python sehingga saya tidak terlalu dalam mempelajari Scala. [Read More]

Maven Dependency Problem

I have a problem downloading several pom files from local artifactory. Well, those poms literally doesn’t exist but the jar files are there, so it should not be a problem. The weird thing is it failed to build the package with maven. So, I create those poms manually. And when I try to build it again: $ mvn package The log said: [WARNING] The POM for “package” is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [Read More]

Set Default Browser

For a few month after I did a fresh install of Archlinux, I found that when I try to click a link inside any application, it will call google chrome. So, I decide to fix it today. It actually easy. We can set our default browser with xdg-mime which is owned by xdg-utils. Requirement xdg-utils What I did We can set out default browser with these commands: [Read More]

Create Gif from Video as Project Demo

This time I will show you how to make a gif from a video. Why do we need this? Well, a few hours ago I need to create a demo of a program to get a job. But I can’t give them the source code, that’s why I just show them how the program works. Requirement Simple Screen Recorder / similar software ffmpeg What I did The first thing we need to do is create a video with Simple Screen Recorder / similar software. [Read More]

Dive into Sqlite

Introduction Today we will talk about sqlite in python. I often use mysql as my data source because of a habit, but when I am in a hurry, I guess sqlite will be enough. To keep in mind: I use python3 Sqlite library is called sqlite3 I use hashlib to hash the password (not required) Action Let’s start with a little bit of code: #!/usr/bin/python # -*- coding: utf-8 -*- import hashlib import sqlite3 con = sqlite3. [Read More]

Berbagi Buku

Prakata Salam, Kebetulan ada beberapa buku yang sudah jarang saya baca. Oleh karena itu, daripada hanya memenuhi ruangan kosan saya, sepertinya akan lebih baik untuk diberikan kepada yang membutuhkan. Membutuhkan di sini bukan berarti “dibaca jika sedang mood” tapi lebih ke membutuhkan karena memang ingin membaca / menggunakan buku tersebut. Harapan saya, jika misalnya buku-buku tersebut sudah tidak dibutuhkan lagi nantinya, maka akan lebih baik jika buku tersebut diberikan lagi kepada orang lain oleh orang yang meminjam sebelumnya, semacam chain reaction gitu. [Read More]

My First Time with Awk

Tonight we’ll talk about Awk. Actually, I’ve know it for a long time but I never had any chance to explore it. A few days ago, I need to remove some duplicate lines from a file BUT it should not be sorted. We can also use sort and uniq, but it will end up sorted before we got an actual result. I’m using this kind of script to remove it: [Read More]

Starting Screen in Detach Mode

For a few days I’ve been thinking about GNU/screen. I have some scripts that should be run inside screen everytime a reboot happened. I’ve been looking in stackoverflow, google, etc but haven’t found anything useful. So I’ve been stuck with this kind of script: $ screen -dmS screen_name some_command It will create a new screen, run the command inside it and detach the screen. Well, it’s pretty good actually. But, when the command is done (finished or killed) then the screen will be terminated. [Read More]

Django Project

For about a month I’ve been busy building a Django project. Even though everyday I work with python, but I never try any framework like Django. I can not say it’s hard, but with all those “jobs” in my office, this month is the busiest time for me to took another project (I never know that I will be this busy). Deadline is in the corner and the project is about 75%. [Read More]

Untracking The Tracked Ones

Sudah beberapa hari saya mempunyai keinginan untuk memperbaiki projek yang saya lakukan. Secara tidak sengaja saya memasukkan virtual environment ke dalam repositori yang notabene seharusnya hanya diisi oleh projek yang saya kerjakan. Alhasil banyak sekali perubahan setiap saya mencoba mengerjakan kembali (bahkan) ketika saya tidak mengubah apapun. Berikut cara yang saya temukan untuk meng-untrack file / folder yang sudah di-track: $ git rm --cached -r env Setelah itu, folder tersebut bisa kita masukkan ke dalam file . [Read More]