This file contains hidden or 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 sys | |
from zipfile import ZipFile | |
with ZipFile(sys.argv[1], 'r') as zip_file: | |
filename_list = zip_file.namelist() | |
for filename in filename_list: | |
print(filename) | |
if filename.endswith('.mp4'): | |
zip_file.extract(filename, sys.argv[2]) |
This file contains hidden or 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
ps -T -o comm,policy,rtprio -p $(pgrep -w -d ',' irq) | egrep '(snd|hci)' |
This file contains hidden or 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
cp /usr/lib/wine/x86_64-unix/wineasio.dll.so .local/opt/wine/lib/wine/x86_64-unix/ -v | |
cp /usr/lib/wine/x86_64-windows/wineasio.dll .local/opt/wine/lib/wine/x86_64-windows/ -v | |
cp /usr/lib32/wine/i386-unix/wineasio.dll.so .local/opt/wine/lib/wine/i386-unix/ -v | |
cp /usr/lib32/wine/i386-windows/wineasio.dll .local/opt/wine/lib/wine/i386-windows/ -v |
This file contains hidden or 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
module Maze where | |
import Control.Monad | |
import Foreign | |
import qualified Graphics.UI.SDL as SDL | |
import System.Random | |
import Data.List | |
import Data.Array | |
data Cell = Cell { |
This file contains hidden or 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
from ctypes import c_uint8 as u8 | |
if __name__ == "__main__": | |
a = 32 | |
print(u8(~(a - 1))) | |
print(u8(-a)) |
This file contains hidden or 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) Jarkko Sakkinen 2022 | |
#!/usr/bin/env python3 | |
import re | |
import sys | |
from git.repo import Repo | |
if __name__ == "__main__": | |
repo = Repo(sys.argv[1]) |
This file contains hidden or 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 | |
cat /proc/kallsyms | \ | |
sed -n '/call_meta__/p' | \ | |
sed 's/.*call_meta__\(.*\)/\1/g; s/\(.*\)/SYS_\1 \1/; 1i #include <sys/syscall.h>' | \ | |
gcc -E -P - | \ | |
grep -v 'SYS_' | \ | |
sort -n | \ | |
uniq |
This file contains hidden or 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
function mc | |
set MC_USER (whoami) | |
if set -q TMPDIR | |
set MC_PWD_FILE "$TMPDIR/$MC_USER/mc.pwd.$fish_pid" | |
else | |
set MC_PWD_FILE "/tmp/mc-$MC_USER/mc.pwd.$fish_pid" | |
end | |
/usr/bin/mc -P "$MC_PWD_FILE" "$argv" |
This file contains hidden or 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
nix-user-chroot ~/.nix ~/.nix-profile/bin/nix --extra-experimental-features nix-command --ex | |
tra-experimental-features flakes run github:enarx/enarx platform info |
This file contains hidden or 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 CC_USING_FENTRY | |
#include <linux/types.h> | |
#include <linux/stddef.h> | |
#include <linux/container_of.h> | |
#include <linux/psp-sev.h> | |
#include <linux/kvm.h> | |
#include <linux/kvm_host.h> | |
#include <uapi/asm/kvm.h> |