Skip to content

Instantly share code, notes, and snippets.

View jmhobbs's full-sized avatar

John Hobbs jmhobbs

View GitHub Profile
@jmhobbs
jmhobbs / README.md
Last active February 12, 2024 23:08
Font Subsetting for Velvetcache.org
@jmhobbs
jmhobbs / README.md
Last active March 24, 2023 15:19
Create scrolling text gifs for Slack

Makes little scrolly text jiffs in Flywheel colors.

Prerequisites

  • imagemagick brew install imagemagick
  • gifsicle brew install gifsicle
  • Heartwell 1.2.otf font installed
  • u r on a mac

Usage

@jmhobbs
jmhobbs / particles.html
Created August 12, 2011 21:46
Simple JavaScript Particles
<html>
<head>
</head>
<body>
<canvas id="base" width="500" height="500" style="border: 1px solid #444; background: #000;"></canvas>
<script>
var elem = document.getElementById( 'base' );
var context = elem.getContext( '2d' );
var Sprite = function () {
@jmhobbs
jmhobbs / 503.php
Created May 18, 2010 22:12
Example 503 Error Page
<?php
ob_start();
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
header('X-Powered-By:');
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
# -*- coding: utf-8 -*-
import socket
import os
print("Connecting...")
if os.path.exists("/tmp/python_unix_sockets_example"):
client = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
client.connect("/tmp/python_unix_sockets_example")
print("Ready.")
print("Ctrl-C to quit.")
@jmhobbs
jmhobbs / mongo.todo.py
Created May 18, 2010 03:30
A Simple ToDo App Using Python and MongoDB
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
from datetime import datetime
from pymongo.connection import Connection
import pymongo
class ToDoApplication:
FROM ubuntu:xenial
RUN apt-get update && \
apt-get install -yq software-properties-common python-software-properties && \
add-apt-repository ppa:mc3man/ffmpeg-test && \
apt-get update && \
apt-get install -yq ffmpeg-static
ADD stabilize.sh /opt/
@jmhobbs
jmhobbs / php-source-merge.py
Created August 3, 2010 21:51
Combine PHP Source Files Into THE MONOLITH
# -*- coding: utf-8 -*-
# This script is used to combine PHP source files together into one big glob.
# I wrote this so I could distribute a single file web application, but develop
# it in a sane fashion.
# Copyright (c) 2010, John M. Hobbs
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
@jmhobbs
jmhobbs / Dockerfile
Created December 27, 2018 22:02
Google Cloud Build Secret Environment Demo
FROM busybox
ARG THE_SECRET
RUN echo "::${THE_SECRET}::"
@jmhobbs
jmhobbs / test.nim
Created November 1, 2020 06:18
A passing Nim unit test.
import unittest
suite "description for this stuff":
test "essential truths":
require(true)