Skip to content

Instantly share code, notes, and snippets.

View ha7ilm's full-sized avatar
🇭🇺

András Retzler ha7ilm

🇭🇺
  • Belgium
  • 15:22 (UTC -12:00)
View GitHub Profile
photo_title="""
<div id="tlkio"
data-channel="openwebrx"
style="background-color: white; position:absolute; padding-top: 10px; opacity: 0.95;">
</div>
<script async src="http://tlk.io/embed.js" type="text/javascript"></script>
<script>
tlk_original_height=0;
function resize_tlk()
{
@ha7ilm
ha7ilm / gist:2b7627653b375ac6d6eb
Last active August 29, 2015 14:11
Linut Mint on W520
- had to install xorg-edgers and special version of compiz fusion
- guake is broken
- external display should be connected _after_ starting the laptop
- both displays should be placed below/above each other, on the left
@ha7ilm
ha7ilm / stereo_phaseshift.c
Last active August 29, 2015 14:20
Shifts one channel of a 16-bit stereo audio file (for I/Q phase correction)
#!/usr/bin/tcc -run
#include <stdio.h>
#include <stdlib.h>
//dependencies: sudo apt-get install tcc
//usage: cat sine.raw | ./stereo_phaseshift.c > sine2.raw
//d gives the number of samples to shift:
int d=5, i;
short gs()
{
@ha7ilm
ha7ilm / test3.c
Last active December 2, 2015 19:49
stdin behaviour test
#include <stdio.h>
#include <unistd.h>
int main()
{
pid_t p;
int stat;
int i;
if(!(p = fork()))
{
@ha7ilm
ha7ilm / test3.c
Created December 2, 2015 19:49
stdin behaviour test, 3 processes
#include <stdio.h>
#include <unistd.h>
int main()
{
pid_t p;
int stat;
int i;
for(i=0;i<3;i++) //<===== that's what changed!
if(!(p = fork()))
Individual Contributor License Agreement ("Agreement")
In order to clarify the intellectual property license granted
with Contributions from any person or entity, Retzler András
(hereinafter referred to as "Project Owner") must have a
Contributor License Agreement ("CLA") on file that has
been signed by each Contributor, indicating agreement to the license
terms below. This license is for your protection as a Contributor as
well as the protection of the Project Owner; it does not change your
rights to use your own Contributions for any other purpose.
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.8'?>
<flow_graph>
<timestamp>Sun Feb 14 23:22:04 2016</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
</param>

How to debug any (non-Qt) executable with QtCreator

  1. Create .gdbinit in the same directory as executable, with the following contents:
set breakpoint pending on
b main
  1. Run this:

How to compile and install Mixxx from source on Ubuntu 14.04?

You need to do this if you need the freshest version of Mixxx. However, it might have bugs. Consider installing the stable version from the repository.

First, clone the repo:

git clone https://github.com/mixxxdj/mixxx.git
cd mixxx

Next, install all of the dependencies detailed at:

@ha7ilm
ha7ilm / w520_battery.md
Last active March 26, 2018 07:28
Fix for broken W520 battery clips

I've broken the clips of my Thinkpad's aftermarket battery.

These clips hold the battery in the laptop. Without those, it can slide out, so the battery is not much useful. They were very weak indeed (probabily because the battery is not an original one, but I don't know because this is the only one I disassembled).

I've fixed it with some stick-on velcro (that has glue on its other side).

This should be very cheap, and you are likely to find it in the nearest fabric store.

The velcro seems to keep the battery in the laptop quite stable.