Skip to content

Instantly share code, notes, and snippets.

View elsbrock's full-sized avatar

Simon Elsbrock elsbrock

  • Europe, Germany
  • 03:48 (UTC +01:00)
View GitHub Profile
@eatnumber1
eatnumber1 / renameat2.c
Last active December 5, 2025 08:49
Command-line tool to call renameat2(2)
/*
* Copyright (c) 2023 Russell Harmon
*
* 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 of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@tmaybe
tmaybe / ignore.md
Last active June 14, 2025 16:59
ignoring merge conflicts for specific files in a git repository

How to Ignore Merge Conflicts for Specific Files in a Git Repository

Create a directory and git init it

$ mkdir merge-test
$ cd merge-test/
$ git init
@sebz
sebz / grunt-hugo-lunrjs.md
Last active December 28, 2025 18:24
hugo + gruntjs + lunrjs = <3 search
@imjasonh
imjasonh / markdown.css
Last active September 3, 2025 22:12
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@drkarl
drkarl / gist:739a864b3275e901d317
Last active December 7, 2025 06:52
Ask HN: Best Linux server backup system?

Linux Backup Solutions

I've been looking for the best Linux backup system, and also reading lots of HN comments.

Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.

Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.

  • It has a lot of management overhead and that's a problem if you don't have time for a full time backup administrator.
@progrium
progrium / bash.sh
Created February 17, 2015 14:19
Comparing natural brevity and concise expressiveness between Go and shell/Bash for certain tasks using each tool's "standard" library.
curl -s "$url" | tar -zxC "$dest"
@blabber
blabber / RaumZeitDeponyfier.user.js
Last active December 24, 2023 08:09
RaumZeitDeponyfier - Removes images from RZL blogposts which are likely to contain ponies
// ==UserScript==
// @name RaumZeitDeponifier
// @namespace http://gist.github.com/040c9009cfcb443d1d92
// @description Removes images from RZL blogposts which are likely to contain ponies
// @include http://raumzeitlabor.de/
// @include http://raumzeitlabor.de/blog/*
// @include https://raumzeitlabor.de/
// @include https://raumzeitlabor.de/blog/*
// @version 2
// @grant none
@softwaredoug
softwaredoug / hyperLogLog.c
Created February 3, 2015 04:01
Educational HyperLogLog demo in C
#include "stdio.h"
#include "stdlib.h"
unsigned int max(unsigned int a, unsigned int b) {
return a > b ? a : b;
}
unsigned int bucket(unsigned int val) {
return val & 0xF0000000 >> 28;
}
@tuxfight3r
tuxfight3r / tcp_flags.txt
Last active December 2, 2025 16:48
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
@zakx
zakx / damazon.py
Last active August 30, 2020 00:01 — forked from trehn/damazon.py
#!/usr/bin/python2
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
# Session setup