RSSAmplifier

Blog

Hereket

Recent content on Hereket

hereket.comRSS feed ↗64 posts

Latest posts

Exploring large codebase (unity build) compilation time

Intro 
 Previously I wrote a post about compiling inkscape’s codebase using “unity
build” methods where all files that need to
be compiled are joined during preprosessing phase and then compiled as single
compilation unit. Compiling all that code in one go took from 3 to 6 minutes
depending on optimization parameters. I got some free time and want to…

Measuring HTML size and exploring why it might be big.

Extensions 
 Get Chrome version 
 Get Firefox version 
 Intro 
 This is a description for a tool to measure HTML and it’s tag “waste”. Main
functionality is to measure how much tags (and inline css/js) contribute to the
HTML page size. It previously a personal tool that I converted chrome and
firefox extension because of a requestion from a couple of…

Exploring security incident. <chinese hacker tools> for server management.

Intro &#xA; Some time ago I had to deal with a securtiy incident of what looked like some&#xA;chinese haker group atack on website. There is no exact evidence that it was a&#xA;group of people and not just a single person but from some characteristics of&#xA;attack it feels like it was a group of people. It was quit medium sized website&#xA;and it would&rsquo;ve created quite a bit of chaos if…

Is server slow? Estimating server endpoint processing time from client perspective

Intro &#xA; Sometimes when I work on some mobile apps I get an issue of having slow response&#xA;times which in turn make the app &ldquo;work slow&rdquo; and all complaints come to me. For&#xA;an app user or business owner it does not matter who is responsible. The app&#xA;works slow so for them &ldquo;whoever developed the app did a bad job&rdquo;. Sometimes it&#xA;is easy to solve by just…

Exploring rough TLS size overhead

This is a small exploration to see how much overhead does TLS add for a regular&#xA;connection. We look into regular HTTP and how it changes with adding TLS to&#xA;secure it. &#xA; Basic HTTP &#xA; Initially let&rsquo;s start setting up some baseline and get values that we can&#xA;compare with our other results. For this we will need a simple HTTP response&#xA;without any encryption. For data I…

How much overhead do HTTP headers add on average?

tldr: Testing 1000 popular domains for HTTP header sizes. On average it will&#xA;take 1-2KB. There are small header with 300 byte and huge one with 28KB. &#xA; Introduction &#xA; Several month ago I made a talk in the local developer community for flutter&#xA;developers about cartoonish representation of how low level networking works.&#xA;The talk discussed networking mostly from frontend…

Exploring why decreasing TLS record size can improve webpage load

TLDR: Reducing TLS record size will need less data to decrypt initial&#xA;block and allow loading other assets before loading full document. This will&#xA;also improve TTFB because decryption library will pass decrypted data quicker &#xA; While working on our websites we use several ways to speed it up. Some people to&#xA;to extremes and use just tiny HTML page, some try to keep page always under…

Simple ninja-platformer in C/Wasm

&#xA; &#xA; Platformer &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;&#xA; x &#xA; &#x5e; &#xA; &lsaquo; &#xA; &rsaquo; &#xA; &#xA; &#xA; &#xA;

Interpreter debugger and visualizer (lox)

&#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA;&#xA; language_app &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; Still loading ........ &#xA; &#xA;&#xA; &#xA; &#xA; &#xA;

Instagram uses expiring certificates as single day TLS certificates

TLDR : Instagram changes their TLS certificates daily and they use&#xA;certificates that are just about to expire in a week. &#xA; Intro &#xA; Since I occasionally help debug issues with office networks, I have&#xA;built a simple cross-platform app for myself. One part of the app is a tool that gets the site&#xA;certificate and displays various needed information. To test edge cases and&#xA;verify…

Crafting a visualizer for an interpreter of a toy langguage

Intro &#xA; Linkg to the demo: Interpereter visualizer &#xA; I experimented with Dart for desktop and web development, and I wanted to build&#xA;a non-trivial application to stress-test whether it could handle a more complex&#xA;project. For quite some time, I’d had an idea to build a visualizer for a&#xA;programming language, and it seemed like a project with an appropriate&#xA;difficulty level…

Programming turkmen language

&#xA; &#xA; Game &#xA; &#xA; &#xA;&#xA; &#xA;&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; Kody işlet &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; Kodyň netijesi &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

Comparing C/C&#43;&#43; unity build with regular build on a large codebase

Intro &#xA; From the beginning, C/C++ code has been compiled into separate small code&#xA;objects and later linked into one executable or library. Initially, it was done&#xA;due to hardware limitations as it couldn&rsquo;t process all code simultaneously. These&#xA;days it is done to increase compilation speed by trying to compile just a small&#xA;portion of changed code after the initial full…

RSA algorithm playground

&#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; &#xA; RSA algorithm illustration &#xA; How to generate magic numbers? -->&#xA; What is RSA and where to get magic number? &#xA; &#xA; &#xA; Public exponent &#xA; 0x010001 &#xA; &#xA; &#xA; Modulus &#xA; 0xC4F8E9E15DCADF2B96C763D981006A644FFB4415030A16ED1283883340F2AA0E2BE2BE8FA60150B9046965837C3E7D151B7DE237EBB957C20663898250703B3F…

Simplified explanation of how RSA message encryption/decryption works

Introduction &#xA; After making a small DES illustration I wanted to create similar thing but for&#xA;AES. After some consideration I decided not to do it as it was very similar and&#xA;decided to go with RSA because I really liked it on first encounter with the&#xA;algorithm. From all the algorithms used in SSL it felt like RSA is the simplest&#xA;and most elegant one. I will try to show…

Networking without programming or using netcat, echo, head and file system to create X11 windows

&#xA;&#xA; &#xA; &#xA; &#xA;&#xA;&#xA;&#xA;&#xA; This post is continuation of previous crazy post about creating X11 windows&#xA;with c and sockets but a little&#xA;more crazier. There is a thin line between genious and insanity and this time&#xA;winds blew us to the side of crazines. The problem is that I nerd sniped myself&#xA;into thinking that since opening X11 windows is just…

Opening windows in linux with sockets, bare hands and 200 lines of C

&#xA; Intro &#xA; In this post I want to create a single file C file program to open a windows&#xA;inside Linux without using xlib or any similar libraries. The idea is to explore&#xA;X11 protocol and see how it is used to interact with X server to create windows. &#xA; Before I had strong association that X11 was some magic thing to manipulate windows&#xA;and it&rsquo;s resources. I was very…

Equally distributing uploaded files with md5 hashing of timestamp

Lately I have been digging into django source code to find out how to get access&#xA;to actual file field for renaming during upload in general case. This turned&#xA;out to be impossible because this information is lost as django passes whole&#xA;instance to upload_to instead of file field itself. There was a need to do&#xA;some magic during file upload based on the actual file content hash. But…

Xlib 05: Single file,local shadertoy with hot reloading

&#xA; In last post we looked at doing some opengl and shaders with raw xlib. It was&#xA;done in with single &lsquo;.c&rsquo; file for simplicity. Here we will create almost the&#xA;same thing but with autoreloading shaders on content change. There still will be&#xA;just one &lsquo;.c&rsquo; file but shaders will be split into their own files for easier&#xA;editing. &#xA; The code as usual will be…

Poor mans autoreload server in single file python on linux

Introduction &#xA;&#xA; &#xA; &#xA;&#xA;&#xA;&#xA; In this post I wanted to explore creating a simple python server with automatic&#xA;browser page reload on content change. There are many livereload servers in the&#xA;wild and I used quite a few of them. For example Hugo has a local server with&#xA;auto reload, javascript developers have pretty good local servers when using&#xA;react and etc.…

DES algorithm illustration

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; DES algorithm illustration &#xA; &#xA;&#xA; &#xA; Whole algorithm &#xA; Keys calculation &#xA; Permutation &#xA; SFunction &#xA; &#xA;&#xA; &#xA; &#xA; Input &#xA; -->&#xA; Hello world! &#xA; &#xA;&#xA; &#xA; &#xA; Key &#xA; &#xA; &#xA;&#xA; &#xA; Initialization Vector &#xA; &#xA; &#xA; &#xA;&#xA; &#xA; ECB &#xA; CBC &#xA; &#xA;…

Xlib 04: From scratch opengl and shaders with raw Xlib

Introduction &#xA; In the last post we looked into how&#xA;to create a window with basic OpenGL using fixed function pipeline. In this post&#xA;we will try to recreate the same scene but using more modern aproach using&#xA;shaders. Here we will &ldquo;bake&rdquo; shaders inside our source code. &#xA; Here is the final code of 07_window_opengl_core_profile.c: &#xA; #include <stdio.h>&#xA;#include…

Xlib 03: Opengl fixed function from scratch window in Xlib

Introduction &#xA; We will continue exploring creating windows from scratch in linux using Xlib.&#xA;Here we will look into opening basic window and draw onto it using opengl using&#xA;fixed function pipeline. You can look into previous post &#xA;if you want to compare this approach with software rendering. &#xA; I wanted to start with fixed-function because it is a lot easier and can…

Xlib 02: Software rendering window in X11

Introduction &#xA; This is continuation of the previous post about creating windows using Xlib/X11.&#xA;In this post I will show how to start basic software rendering inside linux from&#xA;scratch usin Xlib. &#xA; Full Code &#xA; 05_window_software_renderer.c &#xA; #include <X11/Xlib.h>&#xA;#include <X11/Xutil.h>&#xA;#include <stdio.h>&#xA;#include <stdint.h>&#xA;#include…

Xlib 01: Creating windows from scratch with Xlib on Linux

Introduction &#xA; In this post I wanted to go over creating windows using raw Xlib (X11) and show&#xA;how to approach the task if you want to do it from scratch. Current trend is to&#xA;use Wayland and a lot of distros already switched to using it but still there&#xA;are a very large portion of computers that are using X11 . &#xA; When I first was learning how to open working with X11 it was very…

Resume and invoice builder

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; Resume/CV and &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

Software rasterized Pong game with WASM

&#xA;&#xA; &#xA; &#xA;

How flutter uses certificate authorities

Few month ago I wrote an article explaining which CAs flutter compiles&#xA;inside the app but recently I was trying to explore how it loads those&#xA;certificaes from memory and found out that my assumption about compiled-in root&#xA;certificates was probably wrong. &#xA; I did a quick skim through dart source code and it looked to me that it was not&#xA;compiling in CAs into the final app. So I…

Programmatically populating django with random and real data

Introduction &#xA; One of the best features of Django is the speed it provides to develop fast&#xA;prototypes. It does not mean that it is a framework to develop prototypes but it&#xA;is very helpful for building quick and fast prototypes when you need one. It is&#xA;my first when I need to build a proof of concept for something or when I want&#xA;quickly prepare something for a presentation. Yet…

Ligatures

&#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; Swap font file &#xA; &#xA; xxx&#xA; &#xA; &#xA; &#xA; error &#xA; error_outline &#xA; warning &#xA; add_alert &#xA; notification_important &#xA; qr_code_2 &#xA; flutter_dash &#xA; align_vertical_top &#xA; align_horizontal_left &#xA; bnagent &#xA; align_horizontal_center &#xA; align_horizontal_right &#xA; align_vertical_center &#xA; kormo &#xA;…

Using ligatures as icons on a website

You can look at font icons here: Font icon ligatures &#xA; Intro &#xA; There are two reasons why I got interested in reasearching about this topic.&#xA;First of a lot of google products loads garbage when you are not using super&#xA;fast internet speeds. The main most noticeble one used to gmail but it looks&#xA;like they fixed it now. &#xA; &#xA; But even though it was annoying it didn&rsquo;t…

Monitoring Raw X11 Communication or why Chromium opens 7 Xorg connections

This is partly a continuation of previous article on this topic:&#xA; Exploring Xorg connections &#xA; While exploring Xorg and its connections I stumbled upong interesting fact that&#xA;some apps open multiple connections to Xorg even though they have just one&#xA;window. For example chromium had 7, skype 8, firefox and telegram had each 2&#xA;connections. Since Skype connection count was…

Exploring Xorg connections

There is part two: Monitoring Raw X11 Communication or why Chromium opens 7 Xorg connections &#xA; Lately I have been playing around with raw X11 protocol by writing apps that&#xA;work directly with Xorg by establishing a unix socket connection with it. It was&#xA;pretty fun to play with and feels like easier than Xlib (but maybe I just got&#xA;better). While doing all that I got interested with…

Flutter Embedded Certificate Authorities

IMPORTANT: This note is wrong about flutter always using embedded CA certificates for&#xA;validation. There is a new corrected note about how it works: &#xA; How flutter uses certificate authorities &#xA; Flutter apps in contrast to general approch embeds CAs&#xA; (Certificate Authority) &#xA;right into the app and do not rely on operating system to verify the validity of&#xA;an SSL certificate.…

Flutter vs Vanilla javascript

tldr: Compare flutter with js for web dev. &#xA; You can play with: &#xA; vanilla js or &#xA; flutter web (canvaskit) or &#xA; flutter web (html renderer) &#xA; If you are on mobile and whant to see how they look go to Video section &#xA; Important : When used with flutter html renderer this app became about 2 Mb&#xA;in size and just over 500 Kb compressed. Go the apps above look around. &#xA;…

Vim tiny IDE: edit-compile-edit cycle for fast error browsing

This is continuation of previous post:&#xA; VIM and Tmux as a tiny quasi IDE &#xA; Intro &#xA; Here in this post I will show you how I use a bit of scripting together with&#xA;vim&rsquo;s quickfix window to speed up my workflow of finding compilation errors.&#xA;There reason to use bash instead of makefiles is because it is easier for me to&#xA;reason what is happening in bash script than in…

VIM and Tmux as a tiny quasi IDE

watch video &#xA; There are multiple approaches to development and everyone has a some style of&#xA;how they like to approach this process. Every task requires could require&#xA;totally different approach and different IDE. So if I do native Android or Flutter&#xA;developemnt it is natural for me to Android Stuio, for Java code it is&#xA;Intellij, for Qt it is more comforatable if Qt Creator is…

Easy todo and notes management with VIM, dmenu and bash

I have been taking notes and managing my todo lists for quite some time. During&#xA;this time I have used different tools for both. For note taking I tried evernote,&#xA;google docs, obsidian, OneNote, regular files and quite a few others. The same&#xA;goes for todo lists. I probably used everything from top 20 list for apps for&#xA;todo management (even taskwarrior). But in the end I ended up…

Instant code reload in Android

Introduction &#xA; Here I am presenting one possible way to do &ldquo;on the fly code reloading&rdquo; of&#xA;JNI code. The whole code is C/C++ compiled in 2 shared libraries and realoded on&#xA;demand without restaring the application. &#xA; This example uses a game tiny &ldquo;game&rdquo; where you just walk around space. This is&#xA;just a placeholder idea borrowed from Casey Muratori&rsquo;s…

Build android apk from command line without gradle

Introduction &#xA; This is post is similar to the one about building flutter but a bit different.&#xA;Actually this one was written a few years prior to writing flutter version but&#xA;just never got published. Since then some steps has changed and I moved to Java 11.&#xA;But you if you still build with java 8 old build method is still surprisingly&#xA;functional. &#xA; So the idea is to build and…

Building flutter android app without gradle

Initial draft &#xA; Introduction &#xA; Flutter is a very useful framework which does quite a lot of heavy lifting and&#xA;hides all the dirty details inside a black box. It is very good when you want&#xA;get the job done but I really like opening black boxes as I really don&rsquo;t like&#xA;magic. &#xA; The sole reasoning behind this project is to build a &lsquo;hello world&rsquo; project…

Web analalytics effect on a mobile page

What happened? &#xA; So I create this site to test some ideas this time I chose to use a &lsquo;static&#xA;site&rsquo; approach. There is no specific reason why I chose it to be this way it is&#xA;just I wanted to try something that I have not tried before. My last test was&#xA;with django. &#xA; So one of my first experiments I wanted to do is to stack different web&#xA;analytics tool on the page…

Xlib Function List

&#xA; &#xA;&#xA;&#xA; &#xA; XLib function searcher &#xA; &#xA; &#xA; Filter &#xA; Show &#xA; &#xA; &#xA; &#xA; &#xA; Filter &#xA; &#xA;&#xA; &#xA; &#xA; All &#xA;&#xA; &#xA; Return type &#xA;&#xA; &#xA; Function Name &#xA;&#xA; &#xA; Params &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; Show &#xA; &#xA;&#xA; &#xA; &#xA; All &#xA;&#xA; &#xA; Return type &#xA;&#xA; &#xA; Function Name &#xA;&#xA; &#xA; Params…

Contact me

Email: info123@hereket.com &#xA; Once you write me I will write you back from real email.

Dna Coloring app

&#xA; &#xA; &#xA;&#xA; &#xA; &#xA; - &#xA; &#xA; + &#xA; &#xA;&#xA; &#xA; &#xA; Show letters &#xA; &#xA;&#xA; &#xA; &#xA; A&#xA; &#xA;&#xA; &#xA; C&#xA; &#xA;&#xA; &#xA; T&#xA; &#xA;&#xA; &#xA; G&#xA; &#xA; &#xA;&#xA; &#xA; &uarr; Up &#xA; &darr; Down &#xA; &#xA; Page Up &#xA; Page Down &#xA; &#xA; Top &#xA; &#xA; &#xA; &#xA; Alternate &#xA; &#xA; &#xA; &#xA; Long line first &#xA; &#xA; &#xA;&#xA;…

Dynamic sphere generation

&#xA; &#xA; &#xA; &#xA; Moving points on a sphere &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; &#xA; &#xA;&#xA;

Dynamic tree generation

&#xA; &#xA;&#xA; &#xA; Click the tree &#xA; &#xA;

Labyrinth lighting

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA; &#xA;&#xA;&#xA;&#xA; &#xA; &#xA; &#xA; &#xA; &#xA;&#xA;&#xA; -->&#xA; -->&#xA; -->&#xA; -->&#xA; -->&#xA; -->&#xA; -->&#xA; -->&#xA;&#xA;

Optical illusion pyramid or tunnel?

&#xA; &#xA; &#xA;&#xA; &#xA;

PDF generation

&#xA;&#xA; &#xA; &#xA; &#xA; &#xA; &#xA;&#xA; &#xA; &#xA;&#xA; &#xA; Are you one a phone? It is probably not going to work here. Open in desktop browser. &#xA; Or you can watch it on youtube &#xA; https://www.youtube.com/watch?v=EZYA1cV53nw &#xA; &#xA; &#xA; -->&#xA;