Skip to content

Instantly share code, notes, and snippets.

View Nircek's full-sized avatar

Marcin Zepp Nircek

View GitHub Profile
SuperBackup -- wyizolowany.zip/New Text Document.txt:$zip2$*0*3*0*9d8b65bd625853b3cdd279cdba545f97*3546*3e8*6834b1c27b44ddde6d3dbff7c736cfb0b6fe4c5fca6fe5238ff214b7e15c81d313375404950301a0f355cb86177ce40579fb38fd5e28291e8c1a50ddb31c8a37d13353d25b0e17728c58d730fea55d4f2f7cba3acc2e439c88f7924193e19d4b2455e2ef8bc171e28c2eb259a2f9b583c439e449af1b3a514ac0b9e93e522afb5ac2430128ce94f28eadb4e54e1b74d44d1cc8da47e57f615a0b9b2ccf061805bcc54c40a1b8b79a0b2b38896c972ff619c2a76d2ee785bb7555da6ab3b9b1ab089591e86b7c6f0ca693a1b7e549d388a63242576606bd5271e065f966e84a371b1a7c9d6b0e007affa668900196f4b39c24f0932ca551b6fb5de07e625d90a1ad930d4cb49844e0f918d497ae9dc8db4b2b9d02abf1ba7a36400efd499590b85a5d8f16def72f0d1c4b49953df839dfa6587f5559ee7a862d53759932fe4006f480fa0540ff06192a38ffe083cb585a3c2f86f56eb66958b460055eb1a86f46700d4bf5e3ff89002922345a75f14e2859799d8746b7d5378c9a9be7c10c74ca78153162275a3c0dd0b31bc95bba36670360f86aee075bc0b9a630faad4bef64c88f397ffbbe3fb92c041df20156aef44b0179768fa7e6adec3cd575e144f604f7715a163f15d766eeb2
@Nircek
Nircek / dancing-deno.svg
Created July 18, 2021 20:50
Dancing dinosaurs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Nircek
Nircek / arch-cheat.sh
Last active September 28, 2021 20:08
Arch
# install base system
ln -s /usr/share/zoneinfo/Europe/Warsaw /etc/localtime
hwclock --systohc
pacman -S nano
nano /etc/locale.gen
# en_US.UTF-8 UTF-8
# pl_PL.UTF-8 UTF-8
locale-gen
localectl set-locale LANG=pl_PL.UTF-8 # nano /etc/locale.conf
localectl set-locale LANGUAGE=pl_PL
@Nircek
Nircek / 1result.txt
Last active June 20, 2021 09:09
OI difficulty
100:
1. 8-ant
2. 8-map
3. 6-gra
95:
4. 12-ska
5. 13-kra
6. 17-gil
7. 24-pod
@Nircek
Nircek / sprawozdanie.md
Last active May 31, 2021 13:26
Sprawozdanie
\documentclass[a4paper,12pt]{article}
% https://szkopul.edu.pl/problemset/problem/dI31cAE23BiVtoZUoRMMe6ug/site/?key=statement
\usepackage[T1]{fontenc}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc}
\selectlanguage{polish}
\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage[margin=2cm,headheight=50pt,includehead,includefoot]{geometry}
@Nircek
Nircek / nginx.conf
Last active October 19, 2021 21:05
nginx config
# https://gist.github.com/Nircek/a77d26456bc1c43c8d9f467963b0d53f
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
async function pbkdf2(login, password, iterations = 1e6, keylen = 256, digest = "SHA-512") {
// wtfpl (c) 2021 Nircek
// src: https://gist.github.com/Nircek/bf06c93f8df36bf645534c10eb6305ca
const salt = new TextEncoder().encode(login);
const plaintext = new TextEncoder().encode(password);
const key = await crypto.subtle.importKey("raw", plaintext, "PBKDF2", false, ["deriveBits"]);
const params = { name: "PBKDF2", hash: digest, salt, iterations };
const hash = await crypto.subtle.deriveBits(params, key, keylen);
return btoa(String.fromCharCode(...new Uint8Array(hash)));
}
@Nircek
Nircek / get-info.sh
Last active December 27, 2021 13:07
get all info about debian system
# debian-like systems (apt installed)
sudo apt install inxi finger
clear
((cat /proc/cpuinfo;echo;for user in $(cat /etc/passwd | cut -f1 -d":");do id $user;finger $user;done;echo "Services:$(echo;systemctl --type=service --all;echo;service --status-all;echo)w:$(echo;w;echo)who:$(echo;who -a;echo;)last:$(echo;last;echo)";inxi -pildfForumxxxv8c0tmc||inxi -pildfForumxxxv 7 -c 0 -tmc;echo "$(dpkg -l | grep -c '^ii') packages:$(echo;dpkg --list)";zgrep 'Start-Date:\|Commandline: apt\|End-Date:' /var/log/apt/history.log /var/log/apt/history.log.*.gz;) 2>/tmp/debug-log;echo "stderr:";cat /tmp/debug-log;rm /tmp/debug-log)
unset HISTFILE
logout
@Nircek
Nircek / 00-docker-qemu-raspberry.md
Last active January 16, 2021 21:05
running x86_64 docker container on respberry 3

note: Deno does not support ARM (denoland/deno#2295), I tried to set up it with https://github.com/dbhi/qus, but it just threw random errors with the wrong executable and with qemu from apts but kernel panics

tl;dr: I'm trying to run the x86_64 deno docker container. On Raspbian I was compiling QEMU with -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard CFLAGS. I got a working x86_64 VM with alpine. But it is too slow to run docker, and it ends with failed to start containerd: timeout waiting for containerd to start. In my opinion, it's because of 15 seconds timeout in this file. I try to rebuild Docker with other timeouts and check if it's working. But my solution is unprofessional and inefficient.

okay, firstly I ran my SSH session to raspberry 3 from @marwyk2003

pi@raspberrypi:~ $ cat /proc/cpuinfo | tail -n1
Model		: Raspberry Pi 3 Model B Rev 1.2
pi@raspberrypi:~ $ uname -a
Linu