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
\n | |
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_redirect: %{time_redirect}\n | |
time_starttransfer: %{time_starttransfer}\n | |
----------\n | |
time_total: %{time_total}\n | |
\n |
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 | |
# requires `pee` command from `moreutils` suite | |
SUMS=( | |
md5sum | |
sha1sum | |
sha256sum | |
) | |
FILE="${1}" | |
printf '<details>\n' |
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
#include <stddefs.h> | |
#pragma byte_order(LittleEndian) | |
#pragma pack(1) | |
struct String | |
{ | |
uint32 len; | |
char str[len]; | |
}; |
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
#include "lockup_timer.h" | |
#define PRINT_ERR(fmt, ...) \ | |
fprintf(stderr, "%s:%d:%s(): " fmt, \ | |
__FILE__, __LINE__, __func__, \ | |
__VA_ARGS__) | |
#include <stdio.h> /* fprintf */ | |
#include <errno.h> /* errno */ |
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 | |
# Python-Version-Compatibility: 3.6 | |
## | |
# Copyright (C) 2018 Jan Chren (rindeal) | |
# | |
# This program is free software: you can redistribute it and/or modify it | |
# under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, version 3 of the License. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
/** | |
* Copyright (C) 2018 Jan Chren (rindeal) | |
* | |
* This program is free software: you can redistribute it and/or modify it | |
* under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, version 3 of the License. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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 | |
curl -so - https://github.com/... | \ | |
pup 'img attr{src}' | \ | |
awk '/:\/\/camo.githubusercontent.com\// { if ( !cache[$0] ) { print; cache[$0]=1; } }' | \ | |
xargs curl -X PURGE |
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
# SPDX-FileCopyrightText: 2018 Jan Chren (rindeal) | |
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only | |
import pathlib | |
import urllib | |
import shutil | |
import tarfile | |
def fetch_tar(url: str, dest_dir: pathlib.Path, clean_dest: bool =True, strip_components: int =0): | |
if clean_dest and dest_dir.exists(): |
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.6 | |
## | |
# Copyright 2018 Jan Chren (rindeal) | |
# Distributed under the terms of the GNU General Public License v3 | |
## | |
class _FilesAndDirsGen: | |
_root_tmpdir: tempfile.TemporaryDirectory | |
_defs: typing.Union[dict, set] |
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
import typing | |
from sys import _getframe | |
class Enum(int): | |
__slots__ = [] | |
"""type: typing.FrozenSet[str]""" | |
names2values = dict() # TODO: make it FrozenBimap | |
"""type: typing.Dict[str, int]""" | |
values2names = dict() |
NewerOlder