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 | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 <git-repo-url>" | |
exit 1 | |
fi | |
url=$1 | |
repo=$url |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#define BUFFER_SIZE 4096 | |
int copy(const char *src_path, const char *dst_path) | |
{ |
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
*.o | |
sysctl_monitor | |
vmlinux.h | |
*.skel.h |
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 | |
if [ $# -ne 2 ]; then | |
echo "usage: ${0##*/} <source> <target>" | |
echo " clone 'source' to 'target' sharing objects" | |
exit 1 | |
fi | |
src=$1 | |
trg=$2 |
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 | |
# Versione riveduta e corretta di mannaggia.sh | |
# problemi di mannaggia.sh: | |
# * scarica solo la prima pagina di ogni lettera dell'alfabeto | |
# * usa /dev/urandom per scegliere una lettera casuale (LOL!), quando Bash ha il supporto al random | |
# * inutilmente complesso, il parsing dei tag veniva fatto con CINQUE PIPE, quando basta un solo awk scritto bene | |
# released under GNU-GPLv3 | |
prescegli() { |
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 | |
dev=$1 | |
dev=$(realpath "$dev") | |
dev=$(basename "$dev") | |
sys="/sys/class/block/$dev" | |
if [ -f "$sys/partition" ]; then |
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
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"os" | |
) | |
func main() { |
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
/core | |
*.o | |
*.lskel.h | |
vmlinux.h | |
*.pem | |
*.x509 |
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 | |
[ $# -eq 2 ] || exec echo "Usage: $0 <install.iso> <disk.img>" | |
for k in qemu kvm qemu-kvm; do | |
which $k 2>/dev/null >/dev/null && kvm=$k && break | |
done | |
[ -n "$kvm" ] || exec echo "error: KVM not found!" | |
cores=$(nproc) |
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 | |
[ $# -ne 2 ] && exec echo "Usage: ${0##*/} <input> <output>" | |
src=$1 | |
dst=$2 | |
dir=$(mktemp -d) | |
trap "rm -rf $dir" EXIT |
NewerOlder