Skip to content

Instantly share code, notes, and snippets.

View lukemilby's full-sized avatar

Luke Milby lukemilby

View GitHub Profile
@mattdy
mattdy / .traefik-cloudflare-tunnel
Last active May 11, 2025 20:18
Traefik on Docker Swarm accessed via Cloudflare Tunnel
Please see https://mattdyson.org/blog/2024/02/using-traefik-with-cloudflare-tunnels for a detailed write-up of this configuration
@Hegabovic
Hegabovic / multi-tenancy.md
Created October 27, 2023 21:33
Full Guide for Multi-tenancy with tenancy with laravel package

TenancyWithLaravel

Full Guide Multi-Tenancy Implementation

Multi-Tenancy Implementation With Multi-Database Approach

Introduction

After conducting an extensive two-week search for a comprehensive guide on implementing multi-tenancy within my SaaS project, I regrettably found no fully documented resources. Consequently, I resorted to seeking assistance through Filament's support channels, where I received invaluable assistance from knowledgeable individuals.

@philhagen
philhagen / zeek_commands.md
Last active May 19, 2024 21:58
Helpful Commands for parsing Zeek log files in JSON format with jq

A former FOR572 student, John D, helfully provided some useful command lines that you might be able to take advantage of, specifically while parsing Zeek's log files when created in JSON format. These commands use the jq utility, which is widely available for most operating systems. Another useful resource is the JSON and jq Quick Start Guide, which is used in FOR572 and provided as a public resource.

Querying Zeek files:

  • dce_rpc.log
    • cat dce_rpc.log | jq '{ operation, "named_pipe", endpoint, ts, "id.orig_h", "id.orig_p", "id.resp_h", "id.resp_p"}'
    • Example output:
      {
        "operation": "NetrShareGetInfo",
        "named_pipe": "\\PIPE\\srvsvc",
      
@diginfo
diginfo / jemalloc.sh
Last active August 2, 2024 02:34
Install latest jemalloc & configure mysql - Ubuntu
#!/bin/sh
## Install latest jemalloc & configure mysql - Ubuntu
## bash <(curl -Ls https://gist.github.com/diginfo/be7347e6e6c4f05375c51bca90f220e8/raw/)
##
apt-get -y install autoconf libxslt-dev xsltproc docbook-xsl
git clone https://github.com/jemalloc/jemalloc.git
cd jemalloc
autoconf
./configure
make dist
import asyncio
loop = asyncio.get_event_loop()
async def hello():
await asyncio.sleep(3)
print('Hello!')
if __name__ == '__main__':
loop.run_until_complete(hello())
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active January 9, 2025 12:22
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@mrhelpmann
mrhelpmann / kali-thpb2.sh
Created September 16, 2015 19:28
I took all the recommended script code and condensed it into this one script. Tested on Kali 2. If you have an issue it is probably on the last few lines around "su - postgres".
service postgresql start
update-rc.d postgresql enable
msfupdate
msfdb init
msfdb start
echo "deb-src http://http.kali.org/kali sana main non-free contrib" >> /etc/apt/sources.list
echo "deb http://http.kali.org/kali sana main non-free contrib" >> /etc/apt/sources.list
apt-get update
apt-get install -y linux-headers-$(uname -r) python-pefile bdfproxy mitmproxy python-openssl openssl subversion python2.7-dev python git gcc make libpcap-dev python-elixir ldap-utils rwho rsh-client x11-apps finger
git clone https://github.com/secretsquirrel/the-backdoor-factory /opt/the-backdoor-factory
@oaass
oaass / thpsetup.py
Last active December 10, 2024 23:10
This will install the additional tools to Kali recommended by "The Hacker Playbook". It will install the tools in /opt/tools
#!/bin/bash
echo ""
echo "=========================================================================="
echo "= Pentest Attack Machine Setup ="
echo "= Based on the setup from The Hacker Playbook ="
echo "=========================================================================="
echo ""
# Prepare tools folder
@nfarrar
nfarrar / learning-computer-security.md
Last active January 13, 2025 18:03
Learning Computer Security

Learning Computer Security

About This Guide

This is an opinionated guide to learning about computer security (independently of a university or training program), starting with the absolute basics (suitable for someone without any exposure to or knowledge of computer security) and moving into progressively more difficult subject matter.

It seems that most people don't realize how much information is actually available on the internet. People love to share (especially geeks) and everything you need to become well versed in computer security is already available to you (and mostly for free). However, sometimes knowing where to start is the hardest part - which is the problem that this guide is intended to address. Therefore, this guide can accuratley be described as a 'guide to guides', with additional recommendations on effective learning and execises, based on my own experiences.

Many of the free resources are the best resources and this guide focuses on them. It is intended to provided a comprehensive

@xuecan
xuecan / des3.py
Created October 30, 2013 10:29
using PyCrypto for 3DES
from Crypto.Cipher import DES3
def _make_des3_encryptor(key, iv):
encryptor = DES3.new(key, DES3.MODE_CBC, iv)
return encryptor
def des3_encrypt(key, iv, data):
encryptor = _make_des3_encryptor(key, iv)
pad_len = 8 - len(data) % 8 # length of padding