$ echo -en 'this is fun!\x00oh no, it copies after nul byte!' | ./a.out | hexdump -C
00000000 74 68 69 73 20 69 73 20 66 75 6e 21 00 6f 68 20 |this is fun!.oh |
00000010 6e 6f 2c 20 69 74 20 63 6f 70 69 65 73 20 61 66 |no, it copies af|
00000020 74 65 72 20 6e 75 6c 20 62 79 74 65 21 00 00 00 |ter nul byte!...|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nc -k -l 13370 | bash & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, ... }: | |
{ | |
home.file.".config/htop/htoprc".source = ./htoprc; | |
home.packages = [ pkgs.htop ]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rofi.modi: window,drun | |
rofi.theme: gruvbox-dark-hard | |
rofi.show-icons: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please see https://i3wm.org/docs/userguide.html for a complete reference! | |
set $alt Mod1 | |
set $super Mod4 | |
set $mod Mod4 | |
font pango: Source Code Pro 9 | |
set $refresh_i3status killall -SIGUSR1 i3status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
general { | |
output_format = "i3bar" | |
colors = true | |
interval = 5 | |
} | |
order += "wireless _first_" | |
order += "ethernet _first_" | |
order += "battery 0" | |
order += "tztime local" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
general { | |
output_format = "i3bar" | |
colors = true | |
interval = 5 | |
} | |
order += "wireless _first_" | |
order += "ethernet _first_" | |
order += "battery 0" | |
order += "tztime local" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
const total = [...document.querySelectorAll("g[data-toggle='tooltip']")] | |
.map(({ dataset }) => dataset.originalTitle) | |
.map((title) => { | |
const [h, m] = title.split("h"); | |
return (+h * 60 + +m) | |
}) | |
.reduce((a, b) => a + b); | |
return (`${Math.floor(total / 60)}h${total % 60}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
const videos = [...document.querySelectorAll("a.video-item")]; | |
const links = videos.map(anchor => anchor.href); | |
const seenLinks = links.map(link => `${link}/seen`); | |
const requests = seenLinks.map(link => fetch(link)); | |
return Promise.all(requests) | |
.then(() => console.log("You've seen a lot of videos today")); | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
LAST_FILE="" | |
norminette "$@" | while read -r line | |
do | |
if [[ "$line" =~ "Norme: " ]] | |
then | |
LAST_FILE="${line:7}" | |
else |