Skip to content

Instantly share code, notes, and snippets.

@jtomchak
jtomchak / upload
Created March 22, 2022 15:35
Upload JSON file to micro.blog
"use strict";
const querystring = require("querystring");
const axios = require("axios");
let jsonData = require("./strapiOutput.json");
async function upload() {
const articles = jsonData.map((category) => {
category.articles.map((article) => {
console.log(article.title);
axios.post(
@fmaida
fmaida / dark-minos.min.css
Last active January 8, 2022 22:13
This will render your minos theme ( https://github.com/carsonip/hugo-theme-minos ) in dark colors, just remember to add customCSS = ["dark-minos.min.css"] under [parameters] in your config.toml file. You can use either the scss file and compile it, or directly the .min.css file
body{background-color:#24292e;color:#eee}#logo,.main-nav-link,a.article-title,p,#page-nav a,.archive-article-title,#main-nav-toggle,.article-entry,.article-toc li a,.tag-cloud a,.article-footer a:hover{color:#eee}a.article-title:hover,a.article-date:hover,a.archive-article-title:hover,#footer a:hover,#page-nav>a:hover,.tag-cloud a:hover,a:hover{border-bottom-color:#eee}.article-entry a{border-bottom:none}.article-entry a:hover{border-bottom:1px dotted #00b6e5}#page-nav .current{background-color:#00b6e5}a,.article-entry a,.article-more-link a,#footer-info a{color:#00b6e5}.article-nav-link-wrap{text-shadow:0 1px #222;color:#00b6e5;text-align:center}.article-nav-link-wrap:hover{color:#eee}#header{background-color:#14191e;border-bottom:1px solid #222}div.highlight,pre,.article-entry code{background-color:#14191e !important;scrollbar-color:#00b6e5 #14191e}.article,.article-date{border-bottom:1px solid #14191e}.archives{border-left:1px solid #14191e}.archive-article-inner:hover{border-left-color:#00b6e5}.article-me
@Andynico
Andynico / layouts_index.html
Created May 29, 2019 13:37
Custom Layout for the Hello micro.blog theme
{{ define "main" }}
{{ $paginator := .Paginate (union .Site.Taxonomies.categories.articles .Site.Taxonomies.categories.podcast) 25 }}
{{ range $paginator.Pages }}
{{ if .Title }}
<div class="post-body post h-entry">
<header>
<h1><a href="{{ .Permalink }}" style="text-decoration: none">{{ .Title }}</a></h1>
#!/bin/bash
# Script to migrate a Mastodon-exported following list to micro.blog
# Generate an API key here: https://micro.blog/account/apps
mbapikey=D43950049A7ECDED91E8
# Then go to your Mastodon instances data export, e.g. https://mastodon.social/settings/export
# where you can download your following list in CSV format
# Or use Fedifinder to generate a CSV of people you follow on Twitter with Mastodon/ActivityPub accounts:
# https://fedifinder.glitch.me/
@aaronpk
aaronpk / indieweb-summit-rsvp.html
Last active June 2, 2018 19:33
Create an HTML page on your website and copy the below HTML into it. Replace the example URL and photo, and add your name. Then visit https://2018.indieweb.org/webmention and paste the link to your page!
<div class="h-entry">
<a class="p-author h-card" href="http://example.org">
<img src="http://example.org/photo.jpg" alt=""/>
Your Name Here</a>:
RSVP <span class="p-rsvp">yes</span>
to <a href="https://2018.indieweb.org/" class="u-in-reply-to">IndieWeb Summit</a>
</div>
#!/usr/bin/env ruby -wKU
# Comments added 6 March 2014.
# Implementation of the MetaWeblog API for my personal Ruby static blog generator.
# This is not even nearly idiomatic Ruby. There are all kinds of issues.
# (What's with the method interiors all being mushed-up together?)
# But -- it's also worked flawlessly for five years without my having to edit it.
# It won't work for anyone else as-is — but if it helps anyone
# to do a MetaWeblog API implementation, then cool.
@alper
alper / import-tweets.txt
Created April 18, 2012 16:25
Thinkup Tweet importetr
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
// Generated on: 2012-04-13 23:44:46 GMT+00:00
// ************** Tweet 1 of 47455 **************
{
"in_reply_to_screen_name": null,
#!/bin/bash
#
# Throw this in your crontab.
#
# https://twitter.com/#!/manton/status/111893189971017729
#
BOSS=boss@example.org
CPU_THRESHOLD=1500