- strace :
sytemcall tracer
:Traces system call summoned by a process from syscall table
System calls, Eg:
open syscall (__NR_open),
kill syscall (__NR_kill),
getdents64 syscall (__NR_getdents64),
#!/usr/bin/env python3 | |
""" | |
This script setups the UDP translators in order to enable UDP traffic forwarding over SSH. | |
-L example usage: `py ssh_udp.py -L 53000:8.8.8.8:53 your_ssh_host` an then `dig @127.0.0.1 -p 53000 google.com` locally | |
-R example usage: `py ssh_udp.py -R 53000:8.8.8.8:53 your_ssh_host` an then `dig @127.0.0.1 -p 53000 google.com` on the server | |
Note: I know this code is ugly. | |
Thanks to https://stackpointer.io/network/ssh-port-forwarding-tcp-udp/365/ for the help | |
""" | |
import subprocess | |
import time |
#!/usr/bin/env python3 | |
# This script will check for commands that you could most easily contribute to tldr (https://tldr.sh/) | |
# Run it in the root of the https://github.com/tldr-pages/tldr repository | |
import os | |
import sys | |
TLDR_DIR = sys.argv[1] if len(sys.argv) > 1 else "./" | |
def get_used_commands(): | |
used_cmds = {} |
FROM debian | |
RUN apt-get update && apt-get install -y git xz-utils python3 curl && rm -rf /var/lib/apt/lists/* | |
RUN git clone https://github.com/emscripten-core/emsdk.git && cd /emsdk && ./emsdk install latest-arm64-linux && ./emsdk activate latest-arm64-linux | |
ENTRYPOINT ["/emsdk/docker/entrypoint.sh"] |
# rm -rf but with safeguards, and cd into the directory | |
# You should put this in a sourced script (e.g .bashrc, .zshrc, etc...) | |
# Link: https://gist.github.com/iTrooz/30318208dff6e0ecfb27302941bdb95f/edit | |
RED="\e[1;31m" | |
ORANGE="\e[38;5;208m" | |
GREEN="\e[38;5;2m" | |
RESET="\e[0;0m" | |
function initdir() { |
# license: CC0 / public domain | |
# https://gist.github.com/iTrooz/4dd70aea9debf80a59f3491601b40a26 | |
# feel free to use ! | |
name: TMate | |
on: | |
workflow_dispatch: | |
inputs: | |
runner: |
This is a collection of the tweaks and modification I've made to my Arch Linux installation over the months. These may be applicable to other distros, but please check first before doing anything. I also included Arch Wiki references for all the procedures I mentioned. My recommendation is not to blindly follow this gist but to always check with the Arch Linux wiki first. Things move fast and by the time you're reading this my gist may be out of date. Lastly, the golden rule: never execute a command you don't understand.
My current DE of choice is KDE's Plasma. I find it just about perfect.
There are various ways to install it on Arch. The most popular one is to install plasma
and plasma-applications
, but I don't like doing that because it comes with too many programs I'll never use. I, instead, install the base plasma
group, remove the few extra packages that come with it, then I finish off by installing a few KDE apps that don't come with th
msys2 vs msys vs msysgit | |
MinGW doesn't provide a linux-like environment, that is MSYS(2) and/or Cygwin | |
Cygwin is an attempt to create a complete UNIX/POSIX environment on Windows. | |
MinGW is a C/C++ compiler suite which allows you to create Windows executables - you only | |
need the normal MSVC runtimes, which are part of any normal Microsoft Windows installation. | |
MinGW provides headers and libraries so that GCC (a compiler suite, | |
not just a "unix/linux compiler") can be built and used against the Windows C runtime. |
#!/usr/bin/env python3 | |
# _*_ coding:utf-8 _*_ | |
import ctypes | |
import os | |
from ctypes import windll, wintypes | |
from typing import Optional | |
NULL: int = 0 |
type statusRecorder struct { | |
http.ResponseWriter | |
status int | |
} | |
func (rec *statusRecorder) WriteHeader(code int) { | |
rec.status = code | |
rec.ResponseWriter.WriteHeader(code) | |
} |