Skip to content

Instantly share code, notes, and snippets.

View heph's full-sized avatar
:shipit:

Heph Adams heph

:shipit:
View GitHub Profile
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 15, 2024 20:11
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@heph
heph / boilerplate.sh
Created September 29, 2018 00:17
How I start all my shell scripts
#!/usr/bin/env bash
#
# Short header explaining what the script does
#
# exit on error, error on unbound variables, disable glob expansion, fail within pipes
set -eufo pipefail
[[ -n "${DEBUG:-}" ]] && set -x
: "${VAR_A=default_value_a}"
@incyclum
incyclum / AWS IAM Policy - ForceMFA.json
Last active April 2, 2020 20:02
AWS IAM Policy - Force MFA - This policy allows users to manage their own passwords and MFA devices but nothing else unless they authenticate with MFA -- *EDIT*: I forgot where I found it in the 1st place. In fact this policy is explained statement by statement in AWS docs: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-man…
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
"iam:GetAccountPasswordPolicy",
@rueycheng
rueycheng / GNU-Make.md
Last active April 29, 2024 01:39
GNU Make cheatsheet
@corny
corny / decode-openssh-cert.py
Last active October 13, 2023 20:08
OpenSSH certificate decoder in Python
#!/usr/bin/env python2
#
# OpenSSH certificate decoder in Python
#
# References:
# - https://tools.ietf.org/html/rfc4251.html#section-5
# - http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?annotate=HEAD
#
# Copyright (c) 2016 Julian Kornberger <jk+github@digineo.de>
#
# file name terraform/modules/aws_vpc/vpc.tf
# first create the VPC.
# Prefix resources with var.name so we can have many environments trivially
resource "aws_vpc" "mod" {
cidr_block = "${var.cidr}"
enable_dns_hostnames = "${var.enable_dns_hostnames}"
enable_dns_support = "${var.enable_dns_support}"
tags {
Name = "${var.env}_vpc"
@erichiggins
erichiggins / docker_passthru.bash.inc
Last active December 4, 2015 03:31
Enables command deligation to Docker images for a specific repo or directory.
# https://gist.github.com/erichiggins/a8bcd07295597d91dea7/
# version: 0.1.0
# author: Eric Higgins <erichiggins@gmail.com>
#
# Installation:
#
# 1) Copy this file into your repo's directory.
# cp docker_passthru.bash.inc ~/src/myrepo/
# 2) Add the following to your ~/.bash_profile to include this script.
# source ~/src/myrepo/docker_passthru.bash.inc
@tmaybe
tmaybe / ignore.md
Last active February 7, 2024 03:18
ignoring merge conflicts for specific files in a git repository

How to Ignore Merge Conflicts for Specific Files in a Git Repository

Create a directory and git init it

$ mkdir merge-test
$ cd merge-test/
$ git init
@jpf
jpf / app.py
Created March 21, 2015 00:46
Example SAML SP using PySAML2. Can handle IdP initiated requests and make SP initated (authn) requests
# -*- coding: utf-8 -*-
import logging
import os
import uuid
from flask import Flask
from flask import redirect
from flask import request
from flask import url_for
from flask.ext.login import LoginManager