Skip to content

Instantly share code, notes, and snippets.

View Kilobyte22's full-sized avatar

Stephan Henrichs Kilobyte22

View GitHub Profile
@WRMSRwasTaken
WRMSRwasTaken / dnsdist.conf
Created September 22, 2024 10:17
dnsdist automatically get domains from pdns authoritative
controlSocket('127.0.0.1')
setACL({"0.0.0.0/0", "::/0"})
local mySubnets = {
"127.0.0.0/8",
"::1/128",
"10.0.0.0/8",
"2a0f:85c1:beef::/48",
"2a0f:85c1:cafe::/48",
"2a09:e1c1:efc0::/44",
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active November 18, 2025 17:17
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
#!/bin/bash
title=$(dmenu -p 'password title: ' < /dev/null)
if [[ "$title" != "" ]]; then
if [[ -f ~/.password-store/"$title".gpg ]]; then
ans=$(echo -e 'no\nyes' | dmenu -p 'answer: ' -mesg 'Password exists, do you want to overwrite?' -only-match)
if [[ "$ans" == yes ]]; then
pass generate -f -c "$title" 30 && \
notify-send "Password Store" "Password generated"
@IntergalacticApps
IntergalacticApps / make_windows10_great_again.bat
Last active September 7, 2025 17:39
Make Windows 10 Great Again - stop Windows 10 spying!
@echo off
setlocal EnableDelayedExpansion
ver | find "10." > nul
if errorlevel 1 (
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
pause
exit
)
anonymous
anonymous / playground.rs
Created April 2, 2016 20:31
Shared via Rust Playground
struct ParseState {
stack: Vec<u64>,
num: Option<u64>
}
fn flush_state(state: &mut ParseState) {
match state.num {
Some(x) => state.stack.push(x),
None => {}
}
@Kilobyte22
Kilobyte22 / ping.pl
Last active December 11, 2015 11:51
#!/bin/perl
# i3blocks script to display current ping
# Licensed under the MIT license
use strict;
use warnings;
sub ping {
my $host = shift;
anonymous
anonymous / gfm.lua
Created January 15, 2015 00:15
------------
-- CONFIG --
------------
output="%s | %s | %s" -- First %s is amount (no $ sign)
-- Second %s is name
-- Third %s is message ('No message' if none)
waitTime=60 -- Time between grabbing new data
outputFile="out.txt" -- Output filename
----------------
anonymous
anonymous / untrusted-lvl10-solution.js
Created May 5, 2014 18:42
Solution to level 10 in Untrusted: http://alex.nisnevich.com/untrusted/
/*************
* ambush.js *
*************
*
* Oh. Oh, I see. This wasn't quite part of the plan.
*
* Looks like they won't let you take the Algorithm
* without a fight. You'll need to carefully weave your
* way through the guard drones.
*
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
=begin
Script to upload screenshots one a press of a button
warning: for this script you need the 'ruby-dbus' gem, also, this will most likely never work on Windows or OSX. Its written for linux after all. By default it utilizes KDE tools. i'll happily add more if requested.
LICENSE: GPL
=end
CFGNAME = "#{Dir.home}/.uploadscreenshot.yml"
require 'dbus'