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 / 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 / sample-slack-coc.md
Created May 2, 2019 18:53 — forked from annalee/sample-slack-coc.md
A sample code of conduct for social slack teams.

[SLACKNAME] Code of Conduct

Welcome!

[BRIEF DESCRIPTION OF THE SLACK AND ITS PURPOSE]

The current admins are:

  • [NAMES]
@emceeaich
emceeaich / GIF-Screencast-OSX.md
Created September 1, 2017 22:12 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@emceeaich
emceeaich / cincinnati_chili.md
Created December 13, 2016 19:45
Cincinnati Chili Recipe

Cincinnati-Style Chili

Copycat recipe for Skyline-style Cincinnati chili, modified from [this recipe] (http://www.food.com/recipe/skylike-chili-skyline-chili-copycat-110548).

In the time that I've spent trying to find/create a decent copycat recipe, this is about as close as I've gotten. When done right, it tastes a lot like the canned original Skyline, but I can't quite get it to taste 100% like the restaurant quality. YMMY and YUMMY both.

Ingredients

  • 2 lbs 85% lean ground beef
  • 2 medium onions, finely chopped
  • 4-5c beef stock
  • 2 (8oz) cans of tomato sauce
@emceeaich
emceeaich / gopher.js
Last active August 26, 2016 05:13 — forked from mcroydon/gopher.js
// gopher.js - a gopher implementation using node.js
// Released under the 3 clause BSD license by Matt Croydon <mcroydon@gmail.com> (http://postneo.com)
// Forked by Emma Humphries (https://emmah.net/) for stupid Internet of Things tricks
var net = require('net');
net.createServer(function (socket) {
socket.setEncoding("ascii");
socket.on("data", function (data) {
if (data === '\r\n') {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@emceeaich
emceeaich / README.md
Created March 15, 2016 00:32 — forked from yorkxin/README.md
Amazon S3 Redirect Rules Generator

Amazon S3 Redirect Rules Generator

A Ruby script to generate simple Amazon S3 Redirection Rules XML file.

Update: There is an app for that now! Use Amazon S3 Redirector (Web app) and you can generate the XML without any knowledge about Ruby. Thanks to @rainforestapp. BTW, It's open source too.

Dependencies

  • Nokogiri