Skip to content

Instantly share code, notes, and snippets.

View ferr0's full-sized avatar

Alexander ferr0

View GitHub Profile
@ferr0
ferr0 / .ansible.cfg
Created September 6, 2024 19:23 — forked from wbcurry/.ansible.cfg
Ansible: .ansible.cfg
# config file for ansible -- http://ansible.com/
# ==============================================
# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
[defaults]
@ferr0
ferr0 / openwrt-hacking.md
Created September 2, 2024 15:00 — forked from shakahl/openwrt-hacking.md
OpenWrt Hacking

OpenWrt Hacking

Guides

More space for packages with extroot on your OpenWrt router

If you would like to install extra packages on OpenWrt, but you have run out of space on your router’s internal flash memory, then this tutorial is for you.

The plan is to copy the OpenWrt’s root filesystem onto an external USB flash drive, and tell the router to switch to that when it boots up.

@ferr0
ferr0 / .golangci.yml
Created April 10, 2024 11:30 — forked from maratori/.golangci.yml
Golden config for golangci-lint
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021 Marat Reymers
## Golden config for golangci-lint v1.57.2
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt and change it for your needs.
run:
@ferr0
ferr0 / README.md
Created December 28, 2023 07:28 — forked from Sugaroverdose/README.md
Automatic creation of 70-persistent-net.rules on CentOS 7 with net.ifnames=0 and biosdevname=0

Automatic creation of 70-persistent-net.rules on CentOS 7 with net.ifnames=0 and biosdevname=0

All quoted scripts are direct copy from latest CentOS 6

  • Logon under root or sudo -s

  • Create "/lib/udev/write_net_rules" file with content:

#!/bin/sh -e
#
# Copyright (C) 2006 Marco d'Itri <md@Linux.IT>
@ferr0
ferr0 / Compile Mainline Kernel (5.15.0) from WSL2.md
Created June 17, 2023 23:13 — forked from oleksis/Compile Mainline Kernel (5.15.0) from WSL2.md
Steps for compile Mainline Kernel Linux using WSL2

Compile Mainline Kernel for WSL2

Steps for compile Kernel Linux 5.15.0

Actual Kernel

$ uname -a
Linux DESKTOP-ID 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 GNU/Linux

Work Dir linux

@ferr0
ferr0 / systemd_service_hardening.md
Created March 26, 2022 18:40 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@ferr0
ferr0 / !_wt+powershell+themes.md
Last active February 2, 2022 08:36
Install windows-terminal + powershell (Latest) on clean Win10/11

image

Install choco

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Install package's

@ferr0
ferr0 / linux_privesc
Created June 12, 2020 09:08 — forked from sckalath/linux_privesc
Linux Privilege Escalation Techniques
// Determine linux distribution and version
cat /etc/issue
cat /etc/*-release
cat /etc/lsb-release
cat /etc/redhat-release
// Determine kernel version - 32 or 64-bit?
cat /proc/version
uname -a
uname -mrs
@ferr0
ferr0 / haproxy.cfg
Created February 28, 2020 02:41 — forked from SilverBut/haproxy.cfg
[Haproxy cfg checking Socks5] Haproxy cfg to check the Socks5 connection #tags: GFW, network, haproxy, config
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
@ferr0
ferr0 / id_by_date.sql
Created April 16, 2018 11:03 — forked from radimih/id_by_date.sql
MySQL: функция бинарного поиска
DROP FUNCTION IF EXISTS squid_log.id_by_date;
CREATE FUNCTION `id_by_date`(day DATE)
RETURNS int(11)
DETERMINISTIC /* Чтобы в where-выражении функция не вызывалась для каждой записи */
READS SQL DATA
COMMENT 'Получить id записи, ближайшей к указанной дате'
BEGIN
/*******************************************************************************
* Получить id записи, ближайшей к указанной дате
* ----------------------------------------------