Skip to content

Instantly share code, notes, and snippets.

View ursi's full-sized avatar

Mason Mackaman ursi

  • Platonic.Systems
View GitHub Profile
@ursi
ursi / publishing-packages.md
Last active April 2, 2021 01:03
The current process for Publishing PureScript packages

PureScript is currently in a transitional period with regards to how new packages are published. As such, the process of publishing a package is rather arduous. You will need: spago, pulp, and bower.

  1. Make sure your package name is unique by searching for it in bower-packages.json and new-packages.json. Alternatively you can search Pursuit as well, but those two files are the sources of truth.
  2. Make sure the module names in your package are globally unique by searching for them on Pursuit. Unfortunately this is a requirement with the current technology. However, finding a module with the same name on Pursuit doesn't mean all hope is lost. Module names only have to be unique in the package set. So you can use the information in step 6 to see if your module name is actually taken. There is a good number of package
@ursi
ursi / ellie-init.user.js
Last active March 12, 2020 11:01
Set Ellie's initial text
// ==UserScript==
// @name Ellie Init
// @namespace http://tampermonkey.net/
// @version 1.0.0
// @description Set Ellie's initial text
// @author Mason Mackaman
// @match https://ellie-app.com/new
// @grant none
// ==/UserScript==
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width'>
<style>
html {
font-size: 200%;
}
@ursi
ursi / cgs.js
Last active September 21, 2019 05:48
a function for generating getters and setters for custom element classes
function cgs(param) {
if (Array.isArray(param)) var [attr, defaultValue] = param;
else var attr = param;
const descriptor = {
set: function(value) {
this.setAttribute(attr, value);
},
configurable: true,
};
@ursi
ursi / background.js
Created September 18, 2019 00:09
Chromium API Bug
let c = 0
// removing the filter causes it to act normally
chrome.webNavigation.onCompleted.addListener(()=> console.log(++c), {url: [{urlEquals: `https://github.com/`}]});
// commenting this out will cause the above listener to only fire once
chrome.webNavigation.onCompleted.addListener(()=> console.log(++c));
// leaving it in will cause both of them to fire twice
// ==UserScript==
// @name git-scm book
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://git-scm.com/book/en/v2/*
// @grant none
// ==/UserScript==
@ursi
ursi / background.js
Created June 2, 2019 06:24
Open Bookmarks Bar In New Tab
function openInNewTab(url) {
chrome.tabs.create({url: url})
}
function callback(e) {
if (callback.skip) {
callback.skip = false;
} else {
callback.skip = true;
openInNewTab(e.url);
setCursor(guiOrCont, cursor, options := 'n l r m'){
static cursors := {
appstarting: 32650,
arrow: 32512,
cross: 32515,
hand: 32649,
help: 32651,
ibeam: 32513,
no: 32648,
sizeall: 32646,