Skip to content

Instantly share code, notes, and snippets.

@Overbryd
Overbryd / 0-README.md
Last active Jun 30, 2021
Cloudflare Fragment Caching
View 0-README.md

Cloudflare fragment rendering/caching

This worker script will evaluate your origin response, and replace html comments marked as fragment:key with a respective prefetch defined in a X-Fragments response header.

Usage

Your origin must include the X-Fragments header, specifying the a comma separated list of prefetch requests to make for that response.

< HTTP/1.1 200 OK
@whitequark
whitequark / README.txt
Last active Jan 11, 2020
Strava archiver
View README.txt
1. install postgres
2. run makedb.rb >tiles.csv
3. run tiles.sql
4. run archive.rb
5. enjoy
@Jc2k
Jc2k / walkthrough.md
Last active Nov 20, 2017
Installing cowrie with systemd on Ubuntu 16.04
View walkthrough.md

This is a quick demo of using twisted enpoints with cowrie to be able to use systemd socket activation. This has been tested on a fresh install of Ubuntu 16.04.2:

Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-62-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

Last login: Tue May  2 23:47:09 2017
@darencard
darencard / auto_git_file.md
Created May 1, 2017
Automatic file git commit/push upon change
View auto_git_file.md

Automatically push an updated file whenever it is changed

Linux

  1. Make sure inotify-tools is installed (https://github.com/rvoicilas/inotify-tools)
  2. Configure git as usual
  3. Clone the git repository of interest from github and, if necessary, add file you want to monitor
  4. Allow username/password to be cached so you aren't asked everytime
git config credential.helper store
@mubix
mubix / infosec_newbie.md
Last active Jul 14, 2021
How to start in Infosec
View infosec_newbie.md
@sniper7kills
sniper7kills / ELK-install.sh
Last active Feb 7, 2020
ELK-Install-Ubuntu-16.04
View ELK-install.sh
#/bin/bash
#Ask some info
echo -n "Enter ELK Server IP or FQDN: "
read eip
echo -n "Enter Admin Web Password: "
read adpwd
#Update System
sudo apt-get update
sudo apt-get upgrade -y
View dash-listen-3.py
from scapy.all import *
import requests
import time
MAGIC_FORM_URL = 'http://put-your-url-here'
def record_poop():
data = {
"Timestamp": time.strftime("%Y-%m-%d %H:%M"),
"Measurement": 'Poopy Diaper'
}
@tehpeh
tehpeh / ddclient-cloudflare-macosx.md
Last active Jul 20, 2021
Dynamic DNS for Mac OS X with CloudFlare and ddclient
View ddclient-cloudflare-macosx.md

Update June 2019

The patch described below may no longer be necessary. CloudFlare instructions here. Perl module JSON::Any may still be required, however, see comments.

Description

Dyn's free dynamic DNS service will be ending on Wednesday, May 7th, 2014.

CloudFlare, however, has a little known feature that will allow you to update your DNS records via API or a command line script called ddclient. This will

@KiNgMaR
KiNgMaR / cloudflare-ipset.sh
Last active May 24, 2021
Cloudflare IPTABLES and IPSET scripts
View cloudflare-ipset.sh
#/bin/sh
# name of the ipset - v4 or v6 will be appended.
IPSET_NAME=cloudflare-
# argument: v4 or v6 (defaults to v4)
cloudflare_ipset ()
{
local ipv
local inetv
@sethkinast
sethkinast / gist:5914577
Last active Dec 19, 2015
Tiny script to grab Tor exitnodes and ban them via CloudFlare's API
View gist:5914577
#!/bin/bash
SERVERS=(108.162.196.125 108.162.197.125)
for server in ${SERVERS[*]}
do
echo "Now processing $server"
wget --timeout=10 -t1 -O tor.txt https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$server
for ip in `tail -n +4 tor.txt`