Skip to content

Instantly share code, notes, and snippets.

View major's full-sized avatar
🤠
Yeehaw.

Major Hayden major

🤠
Yeehaw.
View GitHub Profile
@vandorjw
vandorjw / Fedora 20, Uwsgi, nginx, django, python3
Last active June 23, 2020 02:23
Turn Fedora 20 into Webserver
# This is a step by step tutorial on how to run uwsgi in emperor mode,
# behind nginx on Fedora 20. I'll add to the tutorial as time goes on.
# SeLinux will likely be a pain (even in permissive mode), so please see my comment on how to fix it.
sudo yum upgrade
sudo yum install nano yum-utils gcc uwsgi-plugin-python3 nginx
yum-builddep python3-psycopg2
@rizalgowandy
rizalgowandy / ducky.md
Last active July 25, 2023 07:18 — forked from schmich/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2

To use media keys on the Ducky One 2, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@roman-yepishev
roman-yepishev / dell-os-recovery-linux-mini-howto.md
Last active September 17, 2023 14:13
Dell OS Recovery Tool under Linux Mini-HOWTO

Dell OS Recovery Tool Under Linux Mini-HOWTO

Since I was unable to find a specific answer to how can one create a Dell recovery disk from within Linux, I decided to write the steps here.

If you write the CD image directly to the USB drive (or create a new partition and write it there), the laptop will not boot. You need your USB media to be in FAT32 format with the contents of the recovery ISO.

  1. Download the recovery ISO from the support section of Dell website.
  2. Insert a USB Drive with enough capacity to hold the contents of the ISO image.
  3. Format the drive and create a filesystem where $USB_DEVICE is your USB drive (check with fdisk -l, it may be
@valeriansaliou
valeriansaliou / iptables-http-dos-shield.txt
Last active September 21, 2023 07:34
HTTP/HTTPS DOS shield w/ IPTables
# Those rules protect HTTP/HTTPS services for both IPv4 and IPv6 sources as such:
# 1. Prevent a /32 IPv4 or /64 IPv6 to open more than 10 HTTPS?/TCP connections per second (the limit is high, but this still shield against some attacks) — DROP TCP packets in this case, to avoid generating egress traffic sending a RST
# 2. Limit ingress bandwidth to HTTPS? services to 32KB/sec (adjust to your needs, in my case it is used to shield a WebSocket backend against incoming WebSocket message floods)
# 3. Limit the number of simultaneous ongoing connections to HTTPS? to 40 (also, high limit, adjust to your needs)
# The protections those rules offer:
# 1. Prevent crypto-DOS (ie. a client that proceed too many key exchanges and thus exhaust server CPU)
# 2. Prevent WebSocket floodings (eg. I use this for Socket.IO, which has no efficient way to rate-limit received messages before they get parsed)
# 3. Prevent ephemeral TCP port exhaustion due to a client holding too many TCP connections
# 4. Prevent IPv6 rotation attac
@rjnienaber
rjnienaber / orgchartBuilder.py
Created February 18, 2011 06:03
Script to build an organizational chart from Active Directory
'''
Copyright (c) 2011, Richard Nienaber
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
The name of 'Richard Nienaber' may not be used to endorse or promote products derived from this software without specific prior written permission.
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active March 31, 2024 18:45 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@Anime4000
Anime4000 / readme.md
Last active April 5, 2024 13:12
Linux Mail Server Postfix Dovecot Virtual User, no sql database

Linux Mail Server

In this guide, I will show you how to make a Linux Mail Server in fast and easy way. This guide was taken from tiq's tech-blog for recent version, Linux distro I using is Ubuntu 20.04 LTS

Certificate

Make sure you have Certificate and Key file ready to use.

You can use existing Web Server SSL certificate, since we going to use same domain, example.com.

If you plan to use mx.example.com or mail.example.com you need create another one for these.

@mudge
mudge / blocklist.sh
Last active April 9, 2024 16:41
A Bash script to generate an Unbound configuration to block all domains on The Firebog's "The Big Blocklist Collection" and allow all domains on Anudeep's list
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Download all ticked blocklists from The Firebog's "The Big Blocklist
# Collection" [0] and block access to them with Unbound by redirecting traffic
# to 0.0.0.0.
#
# [0]: https://firebog.net
(