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 python3 | |
# Parse metadata for staged OSTree deployment | |
# (c) Karim Vergnes <[email protected]> | |
import json | |
from gi.repository import GLib | |
VARIANT_TYPE = GLib.VariantType("a{sv}") |
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 python3 | |
"""Sprinkle - Write random data at random places | |
Usage: | |
sprinkle.py <file> [--size=<size>] [--safe-start=<start>] [--safe-end=<end>] [--once] | |
Options: | |
-h --help Show this message and exit. | |
--version Show version. |
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
#!/bin/sh | |
# nixos-spawn (c) Karim Vergnes <[email protected]> | |
# This script launches systemd-nspawn in an empty root, with an overlay of the | |
# host's Nix Store. This takes advantage of the NixOS stage 2 init's ability to | |
# populate an empty system automatically. | |
# By default, no changes are persisted anywhere -- use an additional bind mount | |
# to add permanent storage. | |
: ${NIXOS_CHANNEL:=nixpkgs} |
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
#!/bin/bash | |
# Reboot-EFI (c) Karim Vergnes <[email protected]> | |
# Wrapper to reboot to a set UEFI entry | |
# Requires efibootmgr and fzy | |
rebootcmd="shutdown -r now" | |
trap _exit KILL INT TERM | |
_exit() { |
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
#!/bin/sh | |
# bwrap-nix (c) Karim Vergnes <[email protected]> | |
# It's Nix in a Box! (useful for an unprivileged Nix environment) | |
if [[ $# < 2 ]] | |
then | |
>&2 echo "usage: $0 <nix directory> <command> [args]..." | |
exit 1 | |
fi |
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
#define vide void | |
#define si if | |
#define sinon else | |
#define retourner return | |
#define pour for | |
#define tantque while | |
#define faire do | |
#define booleen bool | |
#define entier int | |
#define caractere char |
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
GREEN := $(shell tput setaf 2 2>/dev/null) | |
YELLOW := $(shell tput setaf 3 2>/dev/null) | |
BOLD := $(shell tput bold 2>/dev/null) | |
RESET := $(shell tput sgr0 2>/dev/null) | |
define rich_echo | |
printf "${BOLD}$(1)${RESET}\t$(2)\n" | |
endef | |
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 python3 | |
# mk302 by Karim Vergnes <[email protected]> | |
# License: CC0 1.0 Universal | |
# Requires Jinja2 | |
'''<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="REFRESH" content="0;url={{ href }}"" /> | |
<script>window.location.href="{{ href }}"</script> |
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
/* ==UserStyle== | |
@name DuckDuckGo Oozora Subaru Edition | |
@namespace thesola10 | |
@version 1.0.0 | |
@license MIT | |
@updateURL https://gist.githubusercontent.com/Thesola10/a7cbfd9cc7c7b8a697a0c08472d06b98/raw/duckduckgo.user.css | |
@author thesola10 | |
==/UserStyle== */ | |
@-moz-document domain("duckduckgo.com") { |
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 python3 | |
# -*- coding: utf-8 -*- | |
# This script is designed to be installed in ~/.local/bin/bat or equivalent | |
from os import execvp | |
import sys | |
import subprocess | |
if __name__ == "__main__": | |
try: |
NewerOlder