Skip to content

Instantly share code, notes, and snippets.

@GermanAizek
GermanAizek / README.md
Last active July 5, 2024 18:40
Openwrt - Extend disk space for apps

Instructions for expanding space for openwrt programs. In most cases, 2Gb will be enough. We will install the necessary packages for working with USB devices

root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install nano kmod-usb-core block-mount kmod-fs-ext4 kmod-usb-storage-extras e2fsprogs blkid

After install fdisk package

@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active June 24, 2024 22:11
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@mmguero
mmguero / wwg.sh
Last active August 3, 2023 03:28
a wrapper script for wg/wg-quick/systemctl wireguard operations; supports encrypting/decrypting/using openssl-encrypted wireguard config files with wg-quick up and down
#!/usr/bin/env bash
# wwg.sh
# a wrapper script for wg/wg-quick/systemctl wireguard operations
# https://gist.github.com/mmguero/53f4c9c04ac49c330800e463e4620808/edit
# The idea is you create your wireguard config file (eg, `wg0.conf`),
# then run `wwg.sh enc wg0.conf` to encrypt it. Then, you can use `wwg.sh up wg0.conf`
# which will temporarily decrypt the file, run `wg-quick up` for that interface with
@davecoutts
davecoutts / unifi_ubuntu_2004.sh
Last active May 20, 2024 04:59
Install Ubiquiti Unifi Controller on Ubuntu 20.04
# Install Ubiquiti Unifi Controller on Ubuntu 20.04.
# As tested on a fresh install of ubuntu-20.04.1-live-server, August 22nd 2020.
# Thanks to https://gist.github.com/tmuncks for posting the updated install steps.
sudo apt update
sudo apt install --yes apt-transport-https
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
@ilap
ilap / grafana_telegram_bot.md
Last active July 16, 2024 11:43
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@svet-b
svet-b / bigdashboard_output.pdf
Last active June 13, 2024 08:43
PDF export of Grafana dashboard using puppeteer
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 16, 2024 07:54
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@sethvargo
sethvargo / create-certs.sh
Created June 6, 2018 16:20
Use openssl to create an x509 self-signed certificate authority (CA), certificate signing request (CSR), and resulting private key with IP SAN and DNS SAN
# Define where to store the generated certs and metadata.
DIR="$(pwd)/tls"
# Optional: Ensure the target directory exists and is empty.
rm -rf "${DIR}"
mkdir -p "${DIR}"
# Create the openssl configuration file. This is used for both generating
# the certificate as well as for specifying the extensions. It aims in favor
# of automation, so the DN is encoding and not prompted.
@CHERTS
CHERTS / how-to-install-telegram-send
Last active August 29, 2022 11:19
Fail2ban + Telegram using telegram-send
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.9 (jessie)
Release: 8.9
Codename: jessie
Installing telegram-send
# pip install telegram-send
@nurhambali
nurhambali / Install httpd 2.4.25.txt
Last active April 3, 2017 12:32
Install httpd 2.4.25
#menabahkan repo
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
yum repolist
#install httpd
yum install httpd-2.4.25-1.el7.codeit.x86_64
#setting setsebool
setsebool -P httpd_execmem=1