Skip to content

Instantly share code, notes, and snippets.

@phikal
phikal / claim
Last active December 24, 2023 16:09
Performanz und Sicherheit
sind die größten Spaßverderber
der Informatik.
@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 <[email protected]>
* 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 / .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")))))
[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 / 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
@phikal
phikal / create.sh
Created September 29, 2015 19:17
Create Palemoon package via fpm
#!/bin/bash
# usage: ... [archive] [package type]
NAME=palemoon
MAINT="[email protected]"
LICE="MPLv3.0"
URL="http://www.palemoon.org/"
VERSION=$(echo $1 | sed 's/^palemoon-//' | sed 's/.en-US.*$//')
ARCH=$(echo $1 | sed 's/^.*linux-//' | sed 's/.tar.bz2$//')
@phikal
phikal / gist:bf8807bb9cca1ba9c86c
Created September 19, 2015 14:01
palemoon debian package content
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./usr/
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./usr/share/
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./usr/share/doc/
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./usr/share/doc/palemoon/
-rw-r--r-- 0/0 138 2015-09-19 15:45 ./usr/share/doc/palemoon/changelog.Debian.gz
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./usr/share/icons/
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./usr/share/icons/hicolor/
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./usr/share/icons/hicolor/128x128/
drwxr-xr-x 0/0 0 2015-09-19 15:45 ./usr/share/icons/hicolor/128x128/apps/
@phikal
phikal / Makefile
Created August 15, 2015 13:11
scattering project for Petnica Pi (Monte Carlo Radiative Transfer Simulation)
all: $(ALL)
cc scatter.c -O9 -lm -o scatter
@phikal
phikal / Makefile
Created August 15, 2015 13:09
scattering project for Petnica Pi (Step by Step Photon 3d Simulation)
all: $(ALL)
cc scatter.c -O9 -lm -o scatter
@phikal
phikal / solarized.xml
Last active October 16, 2020 06:47
Android colors.xml with the Solarized color scheme - http://ethanschoonover.com/
<?xml version="1.0" encoding="utf-8"?>
<!--
Solarized colors.xml (solarized.xml) for Android
by Philip K. [https://dyst.ax.lt/~phi]
-->
<resources>
<!-- hex resources -->
<color name="base03">#002b36</color>