Skip to content

Instantly share code, notes, and snippets.

View yumusb's full-sized avatar
🎯
Focusing

榆木 yumusb

🎯
Focusing
View GitHub Profile
@waqaraqeel
waqaraqeel / get_cdn.py
Last active February 23, 2023 22:43
Figures out which CDNs were involved in a webpage fetch given HAR file.
#!/usr/bin/env python3
"""
Figures out which CDNs were involved in a webpage fetch given HAR file.
Requires dnspython
Borrows heavily from https://github.com/turbobytes/cdnfinder
Thank you to cdnplanet.com
Usage: ./get_cdn.py -f har-file
Or you could just import the get_cdn function
@rasschaert
rasschaert / !renew-certificate.sh
Last active October 22, 2024 11:48
Automatic renewal of let's encrypt certificates using docker containers and luadns
#!/bin/bash
# Set PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Run the certbot container to renew the certs
docker-compose -f /opt/docker/certbot/docker-compose.yml run --rm certbot
# Concatenate the resulting certificate chain and the private key and write it to HAProxy's certificate file.
cat /opt/docker/certbot/certbot/etc/letsencrypt/live/example.org/{fullchain,privkey}.pem > /opt/docker/haproxy/ssl/example_org.pem
@olegfedoseev
olegfedoseev / wildcard-dns.go
Created June 14, 2015 09:27
Simple DNS server for wildcard domain with forwarding
package main
// Inspired by https://github.com/tianon/rawdns
import (
"flag"
"log"
"net"
"os"
"os/signal"
@irachex
irachex / snow.js
Created December 16, 2011 17:40
snow.js
/*
Snow Fall 1 - no images - Java Script
Visit http://rainbow.arch.scriptmania.com/scripts/
for this script and many more
*/
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35;
// Set the colors for the snow. Add as many colors as you like
@mjuneja
mjuneja / get_my_access.sh
Created December 14, 2011 15:23
Shell script to get my public key from a url and append to authorized_keys to grant access
#! /bin/bash
if [ ! -d $HOME/.ssh ]; then
`mkdir $HOME/.ssh`
`touch $HOME/.ssh/authorized_keys`
`chmod 0600 $HOME/.ssh/authorized_keys`
else
if [ ! -d $HOME/.ssh/authorized_keys ]; then
echo "Creating authorized_keys file"
`touch $HOME/.ssh/authorized_keys`
`chmod 0600 $HOME/.ssh/authorized_keys`