Skip to content

Instantly share code, notes, and snippets.

View emceeaich's full-sized avatar
🛑
No Tech For ICE

Emma Humphries emceeaich

🛑
No Tech For ICE
View GitHub Profile
@emceeaich
emceeaich / image2urijpeg.sh
Created March 10, 2023 20:39 — forked from vadimkantorov/image2urijpeg.sh
Convert an image to Base64 data-uri format using ImageMagick and OpenSSL
# Usage:
# bash image2urijpeg.sh image.jpg 320x240 > base64.txt # will resize before conversion
# bash image2urijpeg.sh image.jpg > base64.txt # will keep original size
magick "$1" -resize ${2:--} jpeg:- | openssl enc -base64 -A | sed -e 's/^/data:image\/jpeg;base64,/'
@emceeaich
emceeaich / mastodon.md
Created May 31, 2022 05:40 — forked from charlag/mastodon.md
Getting started with Mastodon API

So you want to use Mastodon API! Great!

Overview

Mastodon API is a simple REST api. What's REST? Not important, it's a kind of HTTP API. What's HTTP? It's what web pages are loaded with and kind of thing that everyone is using these days.

How do you load something from Mastodon? You do request like

@emceeaich
emceeaich / gitlab_to_ghec_playbook.md
Created April 1, 2022 00:45 — forked from igorcosta/gitlab_to_ghec_playbook.md
Gitlab to GHEC Migration playbook

GitLab to GitHub Enterprise Cloud (GHEC) migration playbook

This playbook is a step-by-step guide to assist you with migration from GitLab to GitHub.com Enterprise Cloud GHEC.

Steps & Tasks Description
Step One Let's get ready for the migration. This step gives you an overview of what is required to start the migration process
Step Two Creating the artefact to be imported on GitHub requires special access to the Enterprise Cloud Import tool. This step will help you understand what is required to get access to the tool.
Step Three With the file ready to be imported, this step will guide you on how to connect and upload the file to your GitHub Enterprise Cloud instance.
@emceeaich
emceeaich / blosxom.pl
Created February 28, 2022 20:35
Blosxom, a simple blog hosting script from back in the day
#!/usr/bin/perl
# Blosxom
# Author: Rael Dornfest <rael@oreilly.com>
# Version: 0+2i
# Home/Licensing: http://www.oreillynet.com/~rael/lang/perl/blosxom/
# For documentation, type: perldoc blosxom
# Where are my blog entries kept?
my $datadir = "/Library/WebServer/Documents/blosxom";
@emceeaich
emceeaich / moon_phase.js
Last active October 11, 2021 18:47 — forked from Dither/moon_phase.js
JS function to calculate moon phase
function moon_phase(date) { // ported from http://www.voidware.com/moon_phase.htm
var year = date.getFullYear(),
month = date.getMonth(),
day = date.getDay();
if (month < 3) {
year--;
month += 12;
}
@emceeaich
emceeaich / server.py
Created August 15, 2021 00:10
ScrollPhat Example
#!/usr/bin/env python
import subprocess
from flask import Flask, request, jsonify
try:
import http.client as http_status
except ImportError:
import httplib as http_status
print("""
@emceeaich
emceeaich / notes.md
Created June 15, 2020 17:07
Bugzilla query for defects filed on Beta and Release

Bugzilla query for bugs filed against Beta and Release

  • Look at version field
  • Remember all the values that version can be
  • Remember to look at dates filed
.broider {
border-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABUCAYAAAAcaxDBAAAA4klEQVR4nO3WMQrDMBAAwfz/00mvRgit7MSZAVdGhtvCp9cLgCd5D8/qewaCxgSNCbppN6DAA0FjgsYEjQkaEzQmaEzQ2G4QQQeCxgSNCXqYJRQTNCZoTFAAADhgvEjPnl9z+XyCCrpE0Njx+XY/8O2BL59P0Pi8oPF5Qc+ef9wSmrl9yz+NoDFBY+6hi2z5mKAxQWO3zzf7SX97wJnL5xNU0CWCxp4+HwAA3GJ2kXbRXiRoTNCYoJt2Awk8EDQmaEzQ2O4SEnQgaEzQmKAxQWOCxgSNCXqYgDFBY4LGBAX4Ux/Dp/0f9vFDjgAAAABJRU5ErkJggg==") 28 / 28px / 0 round;
border-width: 28px;
border-style: solid;
}
@emceeaich
emceeaich / README.md
Last active October 4, 2019 08:02
Set up nightly in the Unity Bar on Ubuntu

Adapted from older instructions.

Download nightly for AMD64 Linux

$ mkdir /opt/firefoxnightly
$ sudo chown -R $USER:$USER /opt/firefoxnightly
$ tar -xvjf ~/Downloads/firefox-NN.0a1.en-US.linux-x86_64.tar.bz2 -C /opt/firefoxnightly

Create nightly.desktop in home directory.

@emceeaich
emceeaich / clap.js
Last active May 31, 2019 06:56
Environment Sensor for MicroBit and Pimoroni EnvroBit
let t = 0
let claps = 0
input.onButtonPressed(Button.A, function () {
basic.showString("" + `T: ${tm}`)
})
input.onButtonPressed(Button.B, function () {
basic.showString("" + `P: ${p}`)
})
envirobit.onClap(function () {
claps += 1