How to make an offline copy of a website
To create an offline browseable copy of a website you can use the tool wget. I will guide you through the steps on how to create a offline copy based on your needs.
Download the website # wget --mirror --no-check-certificate -e robots=off --timestamping --recursive --level=inf \ --no-parent --page-requisites --convert-links --adjust-extension --backup-converted -U Mozilla \ --reject-regex feed -R '*.gz, *.tar, *.mp3, *.zip, *.flv, *.mpg, *.pdf' http://test.com Change into the directory of the offline copy:
How to install Ubuntu on an Acer C710 Chromebook
To get Ubuntu running on your Acer C710 Chromebook you have the the choice between running it in a chroot environment next to the running Chrome OS or install it in a new partition and boot directly the Ubuntu kernel. I used the 2. option in the past but had some issues with drivers and updating the system. My recommendation is to use Install option 1.
Recovery # If you want to start fresh or your system does not boot anymore, follow the instructions at https://support.
How to get started with Golang
There are multiple resources available to learn Go. The Go Playground allows you to write code in the browser and test it, without that you need to install anything locally.
Golang Resources # Tour of Go Language specification How to Write Go Code Frequently Asked Questions (FAQ) Effective Go Wiki Go Code Review Comments Free books
An Introduction to Programming in Go GO BOOTCAMP Example code
Go by Example Learn Go in Y minutes If you want to start developing Golang more seriously, you will not get around using an IDE that offers you autocompletion and also Debugging capabilities.
Anti-Adblock-Killer Guide to fight Anti-Adblock
Anti-Adblock Introdution # If you use an Adblock technology like uBlock, you sometimes see an Anti-Adblock technology on a website that blocks you from accessing the website content. A famous example recently is forbes.com. I will use a website as an example to show how you can defeat that by creating a custom whitelist rule that will fight the Anti-Adblock but still disable the Advertisements and Tracking. You can call it an Anti-Anti-Adblock or Anti-Adblock-Killer.
Mac OS X Development Setup Guide
Finding a Travel Laptop
I wanted to get a cheap notebook that i can use while travelling. My requirements were the following:
Possibility to run Linux or Windows 8.1 (not RT) Minimum 4 GB RAM SSD of at least 128 GB Dual Core x86 CPU Enough power for 720p x264 video playback Maximum weight 1,5 kg The ACER Aspire V3-371-57S2 (600 Eu) or Microsoft Surface 3 (870 Eu) matched that requirements, but with a price of 600 Euro it was more than I wanted to spend.
How to detect if your Windows application is running under Wine
In 2005, Microsoft started the anti-piracy initiative called Genuine Advantage. To be able to download from Microsoft Download Center, you would have had to pass the validation. It was the first time that Microsoft acknowledged the existence of Wine, by blocking its access to the downloads if a Wine specific registry key was found by the ActiveX control or their standalone tool.
These are some ways to detect Wine:
Registry # Check for the existence of “SOFTWARE\Wine\Wine\Config”
Creating small executables with Microsoft Visual Studio
Starting with an empty project, I will show you how to use Microsoft Visual Studio 2010 to compile your C code without the usual bloating that the compiler adds automatically. This article will just feature C code, I may extend this blog entry for usage with C++ at a later point.
In the empty workspace, create a new file called tinyexe.c with following content:
#include <windows.h> void main() { MessageBoxA(0, "Hello", "world!
Creating small executables with Qt Creator and MingW
Starting with an empty Plain C Project in Qt Creator IDE and gcc from MinGW as compiler, I will show you how to generate small binaries that are independent from MinGW dlls. At the writing of this article the app versions that I used were Qt Creator 2.6.2 with Qt 5.0.1 and gcc 4.7.2.
Replace the code of the main.c with following:
#include <windows.h> void main() { MessageBoxA(0, "Hello", "world!", MB_OK); ExitProcess(0); } Switch the build configuration in menu Projects from Debug to Release and compile the project (Ctrl + B is the default shortcut for this).
Creating the smallest possible Windows executable using assembly language
Using nasm, we can build the smallest possible native exe (without using a packer, dropper or anything like that) file that will work on all Windows versions. This is what one of the possible solution binary looks like:
The code for this little cutie:
IMAGEBASE equ 400000h BITS 32 ORG IMAGEBASE ; IMAGE_DOS_HEADER dw "MZ" ; e_magic dw 0 ; e_cblp ; IMAGE_NT_HEADERS - lowest possible start is at 0x4 Signature: dw 'PE',0 ; Signature ; IMAGE_FILE_HEADER dw 0x14c ; Machine = IMAGE_FILE_MACHINE_I386 dw 0 ; NumberOfSections user32.
Converting a DOS intro to JavaScript/HTML5
One day I had the idea of converting my fr29b DOS intro to JavaScript. Using the canvas element of HTML5, this should be an easy task and offer a good performance as well. To make the port as similar as possible, the standard VGA DOS palette should be supported. Drawing the ARGB values into the canvas can be speed up by using JavaScript typed arrays with an int32 view to write into the image data buffer.
Analysis of the 624 (Six-2-Four) packer
The 624 packer is a executable packer that got released in 1997 by Kim Holviala. It only supports DOS .com files and was targeted to compress 4kb demoscene intros but offers a decent compression of files from 1 kb to 20 kb size.
Uses LZSS (Lempel–Ziv–Storer–Szymanski) compression algorithm The assembly unpacking stub is 127 byte small Fixed length huffmann codes are used to store the length and offset of a match Packed data is stored as a bit stream.
Unpack packed DOS binaries with DOSBox debugger
How to backup and restore a MongoDB Sharded Cluster
The goal of this tutorial is to show a way to backup and restore a MongoDB without the need of using file system snapshots by only using MongoDB shipped tools. In my case I did not have the option to use LVM snapshots, which would have been my primary choice. The restored Cluster will have the same distribution of chunks like it was when the backup was done.
My MongoDB cluster setup looks like this:
Facts to know about MongoDB
The following list contains some facts and problems that I stumbled across in my MongoDB journey. It was a good lesson on what problems you can face in a production environment when you or your company decide to jump onto the latest Hype Train of technology. Fool me once, shame on you; fool me twice, shame on me.
I will update this post from time to time to mark the fixed problems - the current speed is 1 fixed ticket per year.
29 byte DOS intro called fr29b
When going back down memory lane about my programming projects the first memory that comes up is developing software under DOS. The simple way of writing programs as .com files allowed for a lot of fun stuff like coding size competitions. Those executable files did not include any header and got executed as code starting from first byte of the file.
My favorite production of the old days is this 29 byte small intro that I developed 2001 using assembly language.