Skip to content

Instantly share code, notes, and snippets.

@michaelboke
michaelboke / Dockerfile
Last active February 19, 2025 23:50
Docker scratch x509 fix
FROM golang:alpine as builder
WORKDIR /app
#the following 2 steps are optional if your image does not already have the certificate
# package installed, golang:alpine now seems to have it. But a more base image could be missing it.
#RUN apk update && apk upgrade && apk add --no-cache ca-certificates
#RUN update-ca-certificates
ADD main.go /app/main.go
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" -installsuffix cgo -o app .
FROM scratch
@PurpleBooth
PurpleBooth / README-Template.md
Last active March 4, 2025 06:59
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ebidel
ebidel / app.html
Last active May 1, 2021 15:42
Fast Polymer app loading - optimized for first render, progressively enhanced lazy loading
<!DOCTYPE html>
<html>
<head>
<style>
body.loading #splash {
opacity: 1;
}
#splash {
position: absolute;
top: 0;
@informationsea
informationsea / apachelogdb.py
Created August 21, 2013 11:31
Import apache combine log to sqlite3
#!/usr/bin/env python
import argparse
import sqlite3
import csv
import gzip
import bz2
import datetime
def prepare_database(conn):
@mmichaa
mmichaa / spdns-client.py
Last active July 15, 2016 06:25
spdns-client.py -- spDNS update script written in python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Usage:
# spdns-client.py <hostname> <user> <passwd>
#
# With xargs and arguments-file:
# xargs -a spdns-client.args -n 3 spdns-client.py
#
# Copyright 2013 -- Michael Nowak
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>