Skip to content

Instantly share code, notes, and snippets.

From self[at]sungpae.com Mon Nov 8 16:59:48 2021
Date: Mon, 8 Nov 2021 16:59:48 -0600
From: Sung Pae <self[at]sungpae.com>
To: security@docker.com
Subject: Permissive forwarding rule leads to unintentional exposure of
containers to external hosts
Message-ID: <YYmr4l1isfH9VQCn@SHANGRILA>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature"; boundary="QR1yLfEBO/zgxYVA"
@guns
guns / clojure-slam-hound.vim
Created August 3, 2013 01:47
Example function and mapping for running slamhound on the current file
" Require fireplace.vim
function! s:ClojureSlamHound(file)
if &modified
echom "Buffer contains unsaved changes!"
return 1
endif
call fireplace#session_eval(
\ '(clojure.core/require (quote slam.hound) (quote clojure.pprint))'
\ . '(let [file (clojure.java.io/file "' . a:file . '")]'
\ . ' (binding [clojure.pprint/*print-right-margin* ' . &textwidth . ']'
@guns
guns / modifiers.vim
Created May 7, 2011 01:48
Modifier normalization in Vim -- Meta, Mod4
We couldn’t find that file to show.
@guns
guns / bar.clj
Created January 14, 2014 21:40
fireplace#source() issue
(ns bar
(:refer-clojure :exclude [defn]))
(defmacro defn [& _])
@guns
guns / minimum_edit_distance.clj
Last active December 29, 2015 09:59
A naive implementation of minimum edit distance (Levenshtein distance) in Clojure.
(ns minimum-edit-distance
"A naive implementation of minimum edit distance in Clojure.
From: https://www.stanford.edu/class/cs124/lec/med.pdf
Initialization:
D(i,0) = i
D(0,j) = j
@guns
guns / readline.patch
Last active December 29, 2015 09:49
gherkin readline() patch
diff --git a/gherkin b/gherkin
index 2567adf..aeb97e6 100755
--- a/gherkin
+++ b/gherkin
@@ -37,15 +37,12 @@ pb_get="^$"
pb_unget="^$"
readline() {
- IFS=$'\n\b'
+ local IFS=$'\n\b'
@guns
guns / muttrc
Created November 23, 2013 20:50
Encrypt mail only to recipients with public keys
# Encrypt mail only to recipients with public keys
set my_cryptlist=`gpg --list-keys | ruby -e '\
puts $stdin.read.scan(/<(.*?)>/)\
.map { |(e)| "\\\\\\\\<%s\\\\\\\\>" % Regexp.escape(Regexp.escape(Regexp.escape(e))) }\
.join("\\\\|")'`
send-hook ~A "set crypt_autoencrypt=no"
send-hook "~t ($my_cryptlist)" "set crypt_autoencrypt=yes"
@guns
guns / tools.cli.proposal.mail
Last active December 28, 2015 22:48
tools.cli proposal
On Sun 25 Aug 2013 at 09:05:15PM -0500, gaz jones wrote:
> Hey, i am the current maintainer of tools.cli - i have very little
> time to make any changes to it at the moment (kids :) ). I'm not sure
> what the process is for adding you as a developer or transferring
> ownership etc but if I'm happy to do so as I have no further plans for
> working on it.
Hello Gareth,

Deferred reference validation

technomancy, from technomancy/slamhound#19:

“I’ve thought a bit about trying to walk all defmacro bodies in the namespace and check for symbols with a namespace, but that would almost positively result in false positives.”

“I’d rather not handle this than handle this in a way that would have edge cases which could make it go looking for vars that don’t exist.”

@guns
guns / ggs.clj
Created October 13, 2013 09:36
John Korpi's Golden Grid System, rewritten in Garden. This is just a first draft, and excludes the CSS reset and normalizations. Garden: https://github.com/noprompt/garden/
(ns com.metablu.www.ggs
"Joni Korpi's Golden Grid System.
http://goldengridsystem.com/"
(:require [garden.def :refer [defstyles]]
[garden.stylesheet :refer [at-media]]
[garden.units :refer [em percent percent*]]))
(def line 24.0)
(def column (percent (/ 100.0 18.0)))
(def font-size 16.0)