Skip to content

Instantly share code, notes, and snippets.

View Ovyerus's full-sized avatar
🎉
brain is a lot better

Michael Mitchell Ovyerus

🎉
brain is a lot better
View GitHub Profile
@ungoldman
ungoldman / curl_post_json.md
Last active April 15, 2024 14:46
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@Erisa
Erisa / hlg.cr
Created November 11, 2020 17:01
Hard Link Generator
#!/bin/env -S crystal build
# Hard Link Generator
# Generates hard links for all files in a given folder,
# while also finding and replacing strings in the filenames.
#
# The folder is created for you, but existing files (Running it twice?) will cause errors.
#
# Usage:
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@andrewharvey
andrewharvey / mapnik_render_static_map.py
Created October 16, 2011 10:31
Render a static map using Mapnik given centre, zoom and image width/height.
#!/usr/bin/env python
# This script is like generate_image.py from the OSM Mapnik code,
# but it renders based on a given centre point, zoom and final image pixel size
# Author: Andrew Harvey <andrew.harvey4@gmail.com>
# License: CC0 http://creativecommons.org/publicdomain/zero/1.0/
#
# To the extent possible under law, the person who associated CC0
# with this work has waived all copyright and related or neighboring
@lhorie
lhorie / longest-keyword-sequence.md
Last active November 14, 2022 23:21
What's the longest keyword sequence in Javascript?
@Ovyerus
Ovyerus / config.fish
Last active August 7, 2020 04:11
Sexy fish prompt
set -g symb '▲'
set -g leading_brace 0
set -g has_launched 0
function git_info
set -l branch (git rev-parse --abbrev-ref HEAD 2> /dev/null)
printf "%s(%s%s%s)" $c0 $c1 $branch $c0
set -l changes (git status --porcelain --ignore-submodules 2> /dev/null)