Load FontAwesome Fonts with Webpack 2

TL;DR:: Add the (s)css dependency to your main (s)css file and specify where to find the fonts too. Then use the proper loaders in your webpack.config.js file. The past few days I had trouble loading the font-awesome fonts with webpack. I tried quite a few solutions: Using the font-awesome-sass-loader Manual solution webpack + font-awesome test […]

BIOS Loads from 0x7c00

Today I was investigating a bug where a simple program wasn’t executing properly. It emerged that BIOS loads the code from the MBR at 0x7c00. Relevant info reproduced here: The (legacy) BIOS checks bootable devices for a boot signature, a so called magic number. The boot signature is in a boot sector (sector number 0) […]

Stream from a String Instead of CIN in C++

TL;DR: You can stream from a string instead of STDIN. Code is simple and is listed below. A project I did recently had a requirement to overload the >> operator use and STDIN to load data. The problem was not the overload itself, but the fact that testing would introduce a manual side. To get […]

Load Glyphs with LibGDX

TL;DR: Remember to give the font loader the list of characters to render from the font! I’m trying to get a more resolution-independent mechanism to load simple shapes in place. After investigating SVG loading for several days I got nowhere. Then, I found out that libGDX actually supports vector fonts (TTF). Woo-hoo! Internally, it’ll convert […]

Add XML to PostgreSQL from Python

One of the projects I worked on was to import a large number of XML files in a PostgreSQL database (as XML files). I chose python to do it. Here are the steps: Database The data source is the SCOPUS database which has a silly number of entries (approx 20,000,000), most containing 2 XML files […]

Load a CSV File with Header in Postgres via Psycopg

My task is to create a script to load a bunch of files into a DB model. The files are CSV, with quoted strings and headers. Postgres has a COPY command which I find fabulous for loading data. unfortunately, the psycopg implementations copy_from() , copy_to() and copy_expert() have very few examples and I found their […]

Scroll to top