Skip to content

Instantly share code, notes, and snippets.

View mbyczkowski's full-sized avatar
:shipit:

Mat Byczkowski mbyczkowski

:shipit:
View GitHub Profile
@John-K
John-K / minignore.go
Created August 12, 2019 17:08
go script to minimize gitignore rules for those super hairy repos
// minignore.go
// John Kelley <john@kelley.ca>
// January 2019
// Covered by BSD license
//
// minignore parses all of the rules in your gitignore files and omits those rules which are covered by others
// (including duplicate lines). The output is written to the given path with '.new' appended to the filename
//
// Usage: go run minignore.go .gitignore
<!DOCTYPE html>
<html>
<head><title>Fizzlefade</title></head>
<body>
<canvas id="framebuffer" width="320" height="200"></canvas>
<script type="text/javascript">
/* Fizzlefade using a Feistel network.
@ikawnoclast
ikawnoclast / etc-pf.anchors-emerging-threats
Created October 26, 2012 18:38
Mac OS X pf firewall: Avoiding known bad guys, a blog post on ikawnoclastic thoughts
table <emerging_threats> persist file "/etc/emerging-Block-IPs.txt"
block log from <emerging_threats> to any
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:1441150918069,1441152729189,1514931430096,3566681520295870698,4571699068684945648,z0000001568913719296*0569792241890883702</id>
<updated>2019-11-19T04:52:52Z</updated>
<entry>
<category term='filter'></category>
<title>Mail Filter</title>
<id>tag:mail.google.com,2008:filter:1441150918069</id>
<updated>2019-11-19T04:52:52Z</updated>

Important organizational announcement Due to feedback from several people who wish to contribute, this project is being moved to it's own repository. The master copy is now at SalusaSecondus/CryptoGotchas. This will let us more easily take PRs/Issues and track contributions.

@banks
banks / ecdh.go
Last active April 23, 2020 02:12
// ecdh implements a simple way to perform Diffie-Hellman Key Exchange using
// Curve25519 on the command line.
//
// NOTE: this is a toy for fun. Don't use it.
//
// See https://godoc.org/golang.org/x/crypto/curve25519 and
// https://cr.yp.to/ecdh.html for more info.
//
// The final shared secret given is the raw shared secret bytes from DH and is
// not typically suitable for direct use as an encryption key as it can leak
@jaredhirsch
jaredhirsch / gist:4971859
Created February 17, 2013 15:19
all about ETags

ETags: a pretty sweet feature of HTTP 1.1

HTTP caching review

HTTP provides two ways for servers to control client-side caching of page components:

  • freshness may be based on a date or a token whose meaning is app-specific
  • whether or not the client needs to confirm the cached version is up-to-date with the server

This breaks down as follows:

  • Cache locally and don't check before using.
@rnewson
rnewson / haproxy.cfg
Last active November 18, 2021 22:12
haproxy.cfg stanzas to enable Perfect Forward Secrecy and HTTP Strict Transport Security. Requires OpenSSL 1.0.1g or so.
# Bind SSL port with PFS-enabling cipher suite
bind :443 ssl crt path_to_certificate no-tls-tickets ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA384:AES128-SHA256:AES128-SHA:AES256-SHA256:AES256-SHA:!MD5:!aNULL:!DH:!RC4
# Distinguish between secure and insecure requests
acl secure dst_port eq 443
# Mark all cookies as secure if sent over SSL
rsprep ^Set-Cookie:\ (.*) Set-Cookie:\ \1;\ Secure if secure
# Add the HSTS header with a 1 year max-age
@b0gdanw
b0gdanw / DisableStartUsingiCloud.txt
Created October 24, 2019 07:41
Disable Start Using iCloud notification in macOS Catalina 10.15
mv /Volumes/Macintosh\ HD/System/Library/LaunchAgents/com.apple.followupd.plist /Volumes/Macintosh\ HD/System/Library/LaunchAgents/com.apple.followupd.bak
defaults delete com.apple.systempreferences AttentionPrefBundleIDs; killall Dock

Turning Off Github Issues

My friend Michael Jackson turned off github issues on one of his smaller projects. It got me thinking...

Maintainers getting burned out is a problem. Not just for the users of a project but the mental health of the maintainer. It's a big deal for both parties. Consumers want great tools, maintainers want to create them, but maintainers don't want to be L1 tech support, that's why they