Skip to content

Instantly share code, notes, and snippets.

View mihalicyn's full-sized avatar

Alexander Mikhalitsyn mihalicyn

View GitHub Profile
@mihalicyn
mihalicyn / autopkgtest.log
Created April 9, 2024 16:34
autopkgtest problem
autopkgtest-buildvm-ubuntu-cloud -r noble -v \
--cloud-image-url http://cloud-images.ubuntu.com/daily/server
pull-lp-source liblxc-dev noble-proposed
autopkgtest \
--apt-upgrade \
--shell-fail \
--output-dir dep8-lxc-pkg-ubuntu \
lxc-5.0.3/ \

keyoxide key: 801A2056D5CF7ECF6679A79BF9FE8FED56C36D56

@mihalicyn
mihalicyn / recv.c
Last active February 27, 2023 08:28
SCM_PIDFD example
/* This code is based on Michael Kerrisk examples from:
* https://man7.org/tlpi/code/online/dist/sockets/scm_cred_recv.c.html
*
* That's a proposal API for a new SCM_PIDFD auxiliary socket message
*
* Reference https://github.com/uapi-group/kernel-features
*/
/*************************************************************************\
* Copyright (C) Michael Kerrisk, 2022. *
#!/usr/bin/env bash
#Author: Daniel Elf
#Tested w/ btrfs-progs v5.19.1
#Description: Somewhat interactive "undeleter" for BTRFS file systems.
# This will not work for every file in every scenario
# The best 'undeletion' you can do is to recover from backup :-)
#Syntax: ./undeletebtrfs.sh <dev> <dst>
#Example: ./undeletebtrfs.sh /dev/sda1 /mnt/undeleted
#NOTE: device must be unmounted
# var declarations
#!/bin/bash
if [ "$#" -lt 1 ]; then
echo "usage: $0 <kernel_function> [<kernel_function> ...]"
echo "kernel_function - functions to trace (separated by spaces), all should be in #available_filter_functions list"
exit 1
fi
KFUNCS="${@:1}"
for KFUNC in $KFUNCS
#!/bin/sh
#
# This script may be useful when you want to ensure that
# some file tree that your copied from one machine to another one
# is not corrupted.
# In this program we calculate total size of all files in some directory
# (recursively) using du (-b means apparent size in bytes; st_size field
# struct stat used).
# And as another control method cksum program used, and with help of awk,
<?php
error_reporting(E_ALL);
echo "TCP/IP Connection\n";
$port = 23;
$address = gethostbyname('towel.blinkenlights.nl');
//$logfile = 'socket.log';
//unlink($logfile);
<?php
error_reporting(E_ALL);
echo "TCP/IP Connection\n";
$port = 23;
$address = gethostbyname('towel.blinkenlights.nl');
$logfile = 'socket.log';