This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set the site we are modifying | |
const site = 'www.example.com'; | |
// do this on a fetch | |
addEventListener('fetch', event => { | |
const request = event.request | |
const url = new URL(request.url) | |
event.respondWith(handleRequest(request)) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class NomNom | |
def initialize(io) | |
# ...I'm not writing this class over again, hoe! | |
end | |
end | |
class SuperYumNom < NomNom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hosts | |
# | |
# Ye' Old Pirates Host config | |
# by fielding and i8degrees | |
127.0.0.1 localhost | |
255.255.255.255 broadcasthost | |
::1 localhost | |
fe80::1%lo0 localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╓─────[ box drawing cheat sheet ] | |
╙────────────────────────────────────── ─ ─ | |
─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏ | |
┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟ | |
┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# original at https://gist.github.com/c0wfunk/3666392 | |
# revised by Fielding Johnston for personal use | |
# most recent available at | |
# https://gist.github.com/justfielding/f64f7729ae1c0683e3c9 | |
# usage: $0 source_dir [source_dir] ... | |
# where source_dir args are directories containing git repositories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
httpProxy = require('http-proxy'); | |
// | |
// Create a new instance of HttProxy to use in your server | |
// | |
var proxy = new httpProxy.HttpProxy(); | |
//will match the root url or | |
//a request for any html pages |