Skip to content

Instantly share code, notes, and snippets.

import os
#flag -I/usr/include
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <string.h>
// Объявляем необходимые C функции и структуру
fn C.socket(domain int, type_ int, protocol int) int
@Jipok
Jipok / backup.sh
Created March 7, 2025 09:45
Backup HOME with restic, exclude trash, caches and other useless data
#!/usr/bin/env bash
echo -e "\033[0;32mПароль в keepass под именем restic\033[0m"
# Each element is the exclusion path
excludes=(
"$HOME/.local" # Local configuration and application files
"$HOME/.cache" # Temporary cache files
"$HOME/Downloads" # Downloads folder
@Jipok
Jipok / j-click.js
Created August 2, 2025 08:26
j-click.js
document.addEventListener('alpine:init', () => {
let isGlobalListenerAttached = false;
const globalJClickHandler = (event) => {
let target = event.target;
const clickedElement = target.closest('[j-click]');
if (!clickedElement) {
return;
}