Skip to content

Instantly share code, notes, and snippets.

@MonkeyDo
MonkeyDo / links.less
Last active May 17, 2017 09:03
Bootstrap 3 less file for styling :visited links
[
{
"id": "c221d6dd.a94f88",
"type": "tab",
"label": "Flow 4"
},
{
"id": "57a8686a.357858",
"type": "modbus-flex-getter",
"z": "c221d6dd.a94f88",
<div>
<h2>Works</h2>
{
entity.works.length ?
<React.Fragment>
<Table striped>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
/*
* Copyright (C) 2015-2017 Ben Ockmore
* 2015-2016 Sean Burke
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
Auth
- No need for an application page, we will use MetaBrainz’ (currently on MusicBrainz website (https://musicbrainz.org/account/applications).
- No need to generate or store tokens, only handling auth with existing token for existing user. No need to add a DB table to store tokens.
- Possibly a UI change will be needed with a shortcut or simple page that redirects to MBs applications page
Tech stack
- Any good reason why we should use Koa over Express, considering we already use Express for the web server and can possibly reuse some code? https://github.com/koajs/koa/blob/master/docs/koa-vs-express.md
- I don’t think we need Kong. The auth and rate-limiting can be done in Express with the help of packages (links below). Kong will introduce extra requests = extra latency
- Caching with Redis can also be done with Express (links below)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>ListenBrainz player launcher</title>
</head>
<body>
<script>
/**
* sends a request to the specified url from a form. this will change the window location.
<html>
<head>
<title>OpenPost Redirector</title>
</head>
<body onLoad="javascript: document.getElementById('postform').submit();">
<p>Loading...</p>
<form method="post" name="postform" id="postform" action="http://localhost/player/">
<textarea name='listens' id='listens' form='postform' style='display: none;'>[
@MonkeyDo
MonkeyDo / relationships.md
Created October 6, 2020 18:55
Relationships
label description link_phrase source_entity_type target_entity_type
Collaboration This is used to specify that a creator collaborated on a short-term project, for cases where creator is/was a collaborator on Author Author
Involved With Indicates that two persons were romantically involved with each other without being married. is/was involved with Author Author
Member of Group This indicates a person is a member of a group. is/was a member of Author Author
@MonkeyDo
MonkeyDo / lb_play.user.js
Last active December 19, 2022 15:48
MusicBrainz UserScript: play on ListenBrainz
// ==UserScript==
// @name Show "play on ListenBrainz" button on MusicBrainz pages
// @description Add a button on some MusicBrainz pages to open ListenBrainz with a ready-to-play playlist (supported pages: Recording, Release, Release Group, Collection)
// @version 2022.12.19.0
// @namespace https://listenbrainz.org/
// @downloadURL https://gist.github.com/MonkeyDo/6b919302e97dc979f8277b9c71ff82ab
// @updateURL https://gist.github.com/MonkeyDo/6b919302e97dc979f8277b9c71ff82ab
// @include /musicbrainz.org\/(release|release-group|recording|collection)/
// @require https://cdnjs.cloudflare.com/ajax/libs/cash/8.1.2/cash.min.js
// @icon https://github.com/metabrainz/metabrainz-logos/raw/master/logos/ListenBrainz/PNG/ListenBrainz_logo_no_text.png
@MonkeyDo
MonkeyDo / form-review.md
Last active March 28, 2022 09:15
Unified form review

Review of the Unified creation form mockups [GSoC project by Shubh]

https://www.figma.com/file/iDju7gP663mwVYyuyKIa6A/Unified-form-v2?node-id=0%3A1

First of all, I want to say two main things: a) I really appreciate the clean mockups you are putting out. It’s very useful for us to visualize and discuss the details (and later on to implement the components), but also it’s very nice and clean too look at which I appreciate. b) There’s inevitably going to a lot of back and forth in preparation for this project, but I like what you’ve been making so far and I’m confident you can crack that tough problem !

Without further ado, some high-level feedback