Skip to content

Instantly share code, notes, and snippets.

@corburn
corburn / index.html
Last active February 25, 2024 16:25
Minimal HTML5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
@corburn
corburn / CSP.md
Last active September 20, 2023 12:55 — forked from xrstf/letsencrypt.md
Nginx server notes

The following is from scotthelme.co.uk

Content Security Policy

with Content Security Policy (CSP) enabled(and a browser that supports it(http://caniuse.com/#feat=contentsecuritypolicy), you can tell the browser that it can only download content from the domains you explicitly allow http://www.html5rocks.com/en/tutorials/security/content-security-policy/ https://www.owasp.org/index.php/Content_Security_Policy I need to change our application code so we can increase security by disabling 'unsafe-inline' 'unsafe-eval'

@corburn
corburn / .bashrc
Last active February 9, 2021 16:07
Bash functions
# https://danielmiessler.com/blog/the-one-line-cli-bandwidth-test/
alias bt="wget http://cachefly.cachefly.net/100mb.test -O /dev/null"
# Watch nginx logs
alias access='tail -f /var/log/nginx/access.log'
alias error='tail -f /var/log/nginx/error.log'
# column is used here to display a Tab Separated Values file with vertically aligned columns
# less is used so the arrow keys can be used to scroll up/down left/right
tsv() {

Keybase proof

I hereby claim:

  • I am corburn on github.
  • I am corburn (https://keybase.io/corburn) on keybase.
  • I have a public key ASDF87yJtiwEqaVsCUCJBKN5Xxyo4lekGrK_8Ra4b7fMxAo

To claim this, I am signing this object:

@corburn
corburn / postmortem.md
Created September 19, 2018 04:38 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
var query = 'gopher';
fetch('/large.csv').then(function(response) {
var reader = response.body.getReader();
var partialRecord = '';
var decoder = new TextDecoder();
function search() {
return reader.read().then(function(result) {
partialRecord += decoder.decodde(result.value || new Uint8Array, { stream: !result.done });
// query logic...
@corburn
corburn / archlinux.sh
Last active December 5, 2017 17:02
Installing Arch Linux with an encrypted btrfs root, GPT, and UEFI
#!/bin/bash
# UEFI Shell
mount fs01 usb
usb:
shell.x64.efi
# LUKS
dd if=/dev/urandom of=/dev/nvme0n1
@corburn
corburn / bithack.txt
Created January 10, 2014 19:36
MIT 6.172 Performance Engineering of Software Systems Open Courseware Lecture 2
// Swap two integers x and y without a temporary
// Performance poor with instruction-level parallelism (ILP)
// Each step has to wait for the previous step to compute before it can execute
x = x ^ y
y = x ^ y
x = x ^ y
// Minimum of two integers x and y without a branch.
// Can execute in about 4 cycles. Without a branch, the CPU doesn't have to clear
// the pipeline if it predicts the wrong branch.
@corburn
corburn / pre-commit
Created January 24, 2017 00:56
git pre-commit hook to lint .travis.yml using api.travis-ci.org/lint
#!/bin/sh
#
# A hook to check for lint warnings when .travis.yml is modified
# by uploading it to api.travis-ci.org/lint.
#
# A similar result could be achieved by uploading the configuration
# to https://lint.travis-ci.org/ before commiting.
# Redirect output to stderr.
exec 1>&2