Skip to content

Instantly share code, notes, and snippets.

@phikal
phikal / deldup.sh
Last active May 18, 2017 20:04
Delete duplicate files (ie. same hash) within a directory.
#!/bin/bash
MDF="/tmp/deldup.md5"
DUP="/tmp/deldup.list"
if [ $MDF -nt . ]; then
echo found cached hash list in $MDF
else
echo -n "hashing files... "
find -O3 . -type f -print0 $@ | xargs -L 1 -P 2 -0 md5sum > $MDF
echo finished
[DEBUG] XBPS: 0.51 API: 20151030 GIT: UNSET
[DEBUG] Processing configuration directory: /etc/xbps.d
[DEBUG] /etc/xbps.d: ignoring .empty
[DEBUG] Processing system configuration directory: /usr/share/xbps.d
[DEBUG] Parsing configuration file: /usr/share/xbps.d/00-repository-main.conf
[DEBUG] [repo] `https://repo.voidlinux.eu/current' stored successfully
[DEBUG] /usr/share/xbps.d/00-repository-main.conf: added repository https://repo.voidlinux.eu/current
[DEBUG] Parsing configuration file: /usr/share/xbps.d/xbps.conf
[DEBUG] rootdir=/
[DEBUG] metadir=//var/db/xbps
@phikal
phikal / .dir-locals.el
Last active April 17, 2022 11:48 — forked from mooz/.dir-locals.el
My flymake settings for C/C++
;; just an example
((c++-mode . ((flymake-additional-clang-flags . ("-I../" "-std=c++0x")))))
@phikal
phikal / fix-pie.c
Created June 3, 2023 13:57 — forked from x-projs/mkexeloadable.c
Make the executable file can be loaded by dlopen() after glibc>=2.30.
/* REMOVE THE PIE-FLAG FROM AN EXECUTABLE
*
* Copyright (c) 2020 Yubo Xie <xyb@xyb.name>
* Copyright (c) 2023 Philip Kaludercic
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the “Software”), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
@phikal
phikal / claim
Last active December 24, 2023 16:09
Performanz und Sicherheit
sind die größten Spaßverderber
der Informatik.