Skip to content

Instantly share code, notes, and snippets.

View EricCrosson's full-sized avatar
💭
This is not my status.

Eric Crosson EricCrosson

💭
This is not my status.
View GitHub Profile
@swinton
swinton / README.md
Last active May 14, 2024 10:06
Automatically sign your commits from GitHub Actions, using the REST API

Verified commits made easy with GitHub Actions

image

So you want to commit changes generated by a GitHub Actions workflow back to your repo, and have that commit signed automatically?

Here's one way this is possible, using the REST API, the auto-generated GITHUB_TOKEN, and the GitHub CLI, gh, which is pre-installed on GitHub's hosted Actions runners.

You don't have to configure the git client, just add a step like the one below... Be sure to edit FILE_TO_COMMIT and DESTINATION_BRANCH to suit your needs.

#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@Avaq
Avaq / upgrade-guide-fluture-12.md
Last active August 18, 2021 10:59
Breaking Changes Upgrade Guide for Fluture version 12

Fluture v12 Upgrade Guide

Modular version made compatible with Node 12

The modular version of Fluture no longer works with Node version 9, 10, and 11 using --experimental-modules. In order to load the modular version into those runtimes, one has to use the esm loader.

Furthermore, the modular code must now be "deep" imported from fluture/index.js. That is, import 'fluture/index.js' for EcmaScript modules, or require ('fluture') for CommonJS modules.

Future constructor no longer overloaded

@kinlane
kinlane / cryptocompare-openapi.json
Created August 20, 2018 04:11
cryptocompare-openapi
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Cryptocompare",
"description": "TODO: Add Description"
},
"host": "min-api.cryptocompare.com",
"basePath": "/",
"schemes": [
@evanderkoogh
evanderkoogh / example.csv
Created November 20, 2017 13:29
Import CSV into DynamoDB
whateverId attribute1 someotherattribute
foo bar baz
hello erwin world
@schmich
schmich / npm-prerelease.md
Last active January 3, 2024 18:19
Publish a prerelease package to NPM
  • Update package.json, set version to a prerelease version, e.g. 2.0.0-rc1, 3.1.5-rc4, ...
  • Run npm pack to create package
  • Run npm publish <package>.tgz --tag next to publish the package under the next tag
  • Run npm install --save package@next to install prerelease package
@jimblandy
jimblandy / co-contra-variance.md
Last active July 26, 2020 14:24
A simple explanation of covariance and contravariance

If you say "T is a subtype of U", that means that whenever someone wants a U, a T will do: every T works as a U. It follows from this phrasing that U is a subtype of U: certainly if someone wants a U, a U will do.

So if you imagine a type as denoting a set of values, you can write: T ⊆ U.

If every T works as a U, then a function that accepts any U is certainly also a function that accepts any T: fn(U) works as a fn(T). So fn(U) is a subtype of fn(T): fn(U)fn(T).

This is interesting, because the subtypedness gets reversed: T ⊆ U implies fn(U)fn(T).

@pketh
pketh / 1-promises.coffee
Last active April 5, 2023 02:12
Promises in Coffeescript
# Create a promise:
myCoolPromise = new Promise (resolve, reject) ->
# do a thing
success = true
if success
resolve 'stuff worked'
else
reject Error 'it broke'
@solidnerd
solidnerd / GitlabContainerRegistrySetup.md
Last active February 21, 2024 14:48
GitLab Container Registry Setup

Settting up a Container Registry with docker-gitlab

This should be used for new users to getting started with the container registry feature on docker-gitlab.

Requirements