Skip to content

Instantly share code, notes, and snippets.

@stolarczyk
stolarczyk / README.md
Last active March 4, 2024 01:26
Save GitHub issues as TSV

Save GitHub issues as TSV

This script saves GitHub issues in TSV format

Installation

The script has two software dependancies:

  1. GitHub CLI for querying GitHub API
  2. jq for transforming the output of the above to TSV format
@kmrn
kmrn / publish-jekyll-update.yml
Last active December 29, 2022 11:33
GitHub Action to add and commit a new Jekyll blog post
name: Post release to Jekyll Blog
on:
release:
types: [published]
# The GitHub Actions workflow Spincord uses to create and publish a new blog post for every published git tag release.
# This workflow is set up to publish a new blog post to the Spincord gh-pages/jekyll
# site every time a new release is published. The blog post uses the corresponding tag
# name in the title along with the release's body and the current date.

Geojson.net

Geojson.net will be a replacement for geojson.io, the simple editor for map data. In most ways, it has the same intent, goals, limitations, and ideas of geojson.io - they're both projects of mine.

I created geojson.io as a side project in 2013, and it thrived for a few years, as it simply solved the problem of previewing, modifying, and creating map data. I think it benefited from simplicity and unity of thought: it wasn't a product, it didn't have overarching design goals or any sort of leadership. There was the core functionality, and a bunch of functionality that pretty neatly layered on top of that without making the whole thing too intimidating. I'm pretty happy with how it went.

Over the last two or so years, though, geojson.io hasn't changed much, and the web has. Which means that, in a few ways, it's just straight-up broken: GitHub integration is broken, it was never updated to accommodate for the deprecation of anonymous gists, and

@jeremiegirault
jeremiegirault / README.md
Last active December 9, 2022 02:10
Use inline SVG in vue.js

Install svg-inline-loader for webpack :

npm install svg-inline-loader --save-dev

Add it to your loaders in module.loaders section of webpack.config.js:

{
  test: /\.svg$/,
 loader: 'svg-inline-loader'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@enjalot
enjalot / ndjson.md
Last active December 15, 2021 04:10
Tips for processing Quick, Draw! data with ndjson-cli

Quick, Draw! ndjson data

The Quick, Draw! dataset uses ndjson as one of the formats to store its millions of drawings.

We can use the ndjons-cli utility to quickly create interesting subsets of this dataset.

The drawings (stroke data and associated metadata) are stored as one JSON object per line. e.g.:

{
@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aparrish
aparrish / index.md
Last active May 6, 2023 14:29
Getting credentials for the Mastodon API with Mastodon.py. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/

Getting credentials for the Mastodon API with Mastodon.py, step by step

Making a bot? Making a bot in Python? Making a bot in Python that uses the Mastodon API? If so, chances are you need to get some credentials. Here's how I did it!

(The following tutorial uses Python 2.7, but if you're using Python 3+ everything should work substantially the same.)

Mastodon.py authentication

I just started using it, but it looks like Mastodon.py is a pretty great library for working with the Mastodon API! However, all of the authentication examples use static files to store credentials, which I don't like—I'm afraid I'll accidentally push them to Github. I like to keep my authentication as close to the actual command that runs the program as possible, so usually I pass them on the command line to the script running my bot. To do this, I need to get the appropriate credentials on their own, as separate strings that I can cut and paste.

@anaptfox
anaptfox / amazon-polly-file.js
Created December 13, 2016 13:54
Node.js Amazon Polly to file example.
// Load the SDK
const AWS = require('aws-sdk')
const Fs = require('fs')
// Create an Polly client
const Polly = new AWS.Polly({
signatureVersion: 'v4',
region: 'us-east-1'
})