Skip to content

Instantly share code, notes, and snippets.

View 0xdeafbeef's full-sized avatar
🦀

Vladimir 0xdeafbeef

🦀
  • Belgrade
  • 16:13 (UTC +02:00)
View GitHub Profile
@rajkosto
rajkosto / gist:fbfa22a3c6d6bff7d9ebf92ec8adeb34
Last active April 9, 2025 12:44
Yettel Hipernet ZTE ZXHN H298Q detalji, i tutorial za izvlacenje podataka iz config fajla
ZTE Yettel ruter uspostavlja sledece veze preko svog WAN kabla:
Connection: Management
DHCP IPoE VLAN 715 Priority 0
Vendor class dslforum.org
IP address 10.48.x.x/255.254.0.0
Ovu mrezu koristi da komunicira sa TR069 ACS-om na adresi https://acs.cetin.rs:10302/acs/serbia
Connection: Voice
DHCP IPoE VLAN 711 Priority 5
@Rexagon
Rexagon / tl.pest
Created October 23, 2021 12:29
TL pest grammar
WHITESPACE = _{ " " | NEWLINE }
COMMENT = _{
("//" ~ ANY* ~ (NEWLINE | EOI) ) |
("/*" ~ (!"*/" ~ ANY)* ~ "*/")
}
ident_char = @{ ASCII_ALPHANUMERIC | "_" }
lc_ident = @{ ASCII_ALPHA_LOWER ~ ident_char* }
uc_ident = @{ ASCII_ALPHA_UPPER ~ ident_char* }
@satmandu
satmandu / usbtrim
Last active March 31, 2024 00:54
Detect and enable trim for usb-connected sata/nvme drives in initramfs/initrd, ideally before zfs modules load.
#!/bin/bash
# This goes in /usr/share/initramfs-tools/hooks/usbtrim
case $1 in
prereqs)
echo "udev"
exit 0
;;
esac
@sainathadapa
sainathadapa / anti_join.py
Created May 9, 2018 10:00
anti-join-pandas
import pandas as pd
def anti_join(x, y, on):
"""Return rows in x which are not present in y"""
ans = pd.merge(left=x, right=y, how='left', indicator=True, on=on)
ans = ans.loc[ans._merge == 'left_only', :].drop(columns='_merge')
return ans
def anti_join_all_cols(x, y):
@huklee
huklee / MyLogger.py
Last active October 11, 2024 00:30
python Logger using example with Singleton Pattern
# -*- coding: utf-8 -*-
import logging
import os
import datetime
import time
class SingletonType(type):
_instances = {}
@fbartho
fbartho / 0. Synology RAID Expansion-Resync Performance.md
Last active April 12, 2025 00:37
Walkthrough of what I did to increase performance on my Synology NAS box during an expansion, and afterwards.

Performance on Synology RAIDs

(especially while expanding)

Warning: The exact commands may not match for your particular linux OS / Synology(NAS) device. I had to customize the commands after exploring my particular system's setup.

If you're new to linux, or this is a new piece of hardware / a new synology device, jump down to the section called "Inspecting a setup"

Contents

@KodrAus
KodrAus / Profile Rust on Linux.md
Last active August 12, 2024 12:37
Profiling Rust Applications

Profiling performance

Using perf:

$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg

NOTE: See @GabrielMajeri's comments below about the -g option.

@subfuzion
subfuzion / curl.md
Last active April 16, 2025 09:14
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.