Skip to content

Instantly share code, notes, and snippets.

View oc-monitor.moon
#!/usr/bin/moon
-- Imports
{ energy_device: cell, :gpu } = require('component')
event = require('event')
os = require('os')
-- Constants
running = true
width, height = gpu.getResolution()
data =
@Vap0r1ze
Vap0r1ze / lineto-circular.js
Last active Dec 4, 2020
get circular fonts
View lineto-circular.js
const fs = require('fs')
const { queue } = require('async')
const request = require('superagent')
async function main() {
const fonts = []
const page = await request
.get('https://lineto.com/typefaces/circular/')
.set('user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36')
fontCutsIndices = []
@Vap0r1ze
Vap0r1ze / discord_oauth2.md
Last active Mar 18, 2021
Discord OAuth2 Flow
View discord_oauth2.md

Discord OAuth2

Step 1

You: Redirect User to https://discordapp.com/api/oauth2/authorize

Query Params
name value
client_id Your application's Client ID
scope A list of scopes, delimited by spaces
redirect_uri The uri to send the user after authorization
View regex_tuesday.txt
/\b([^ ]+) (\1)\b/gi $1 <strong>$2</strong>
/^(1\d{3}|200\d|201[0-2])\/(0[1-9]|1[0-2])\/(0[1-9]|[1-2]\d|3[0-2]) ([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/
/^(?:\d{1,3}(,\d{3})*(\.\d+)?|\d{1,3}( \d{3})*(,\d+)?)$/
/^\*( +)(.+)(\n)\*( +)(\2)$/gim *$1$2$3*$4**$5**