Skip to content

Instantly share code, notes, and snippets.

Simeon Vincent dotproto

Block or report user

Report or block dotproto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dotproto
dotproto / LICENSE
Created Nov 15, 2019
Minimal working Manifest V3 extension.
View LICENSE
Copyright 2019 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@dotproto
dotproto / yt-translation.js
Created Oct 4, 2019
Open transcription suggestion for current YT video
View yt-translation.js
javascript:(function(){
var log = (...a) => console.log(...a);
const url = new URL(document.location.href);
if (url.hostname.endsWith('youtube.com')) {
const id = url.searchParams.get('v');
window.location = `https://www.youtube.com/timedtext_video?v=${id}`;
}
})()
@dotproto
dotproto / LICENSE
Created Jun 13, 2019
Simple extension that injects a script before the page loads
View LICENSE
Copyright 2019 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@dotproto
dotproto / index.css
Created Jul 10, 2018 — forked from stereokai/index.css
Trigonometry in CSS
View index.css
//----------------------------------*\
// TRIGONOMETRY FUNCTIONS
//----------------------------------*/
// # Trigonometry in CSS
//
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf
// - Useful if you don't want to use JS.
// - With CSS Variables.
// - `calc()` can't do power (x ^ y) so I used multiplication instead.
@dotproto
dotproto / merge.js
Last active Apr 26, 2018
Merge async iterators
View merge.js
(async function() {
console.clear();
class Deferred {
constructor() {
this.promise = new Promise((resolve, reject) => {
this.resolve = resolve;
this.reject = reject;
});
}
View typeface_advice.md

On Dec 3, 2017 [I asked Marcin Wichary][request] for advice on "font design" and he suggested I check out [Zach Leatherman's thread][zach_thread] where he asked a very similar question.

Books

  1. [How to create typefaces: from sketch to screen][book1]
  2. [Counterpunch][book2]
  3. [Designing Type][book3] by Karen Cheng
  4. [While You're Reading][book4] by Gerard Unger
  5. [Essential Type: An Illustrated Guide to Understand and Using Fonts][book5] by Tony Seddon
  6. [Lettering for Reproduction][boo6] by David Gates
@dotproto
dotproto / assignProps.js
Created Nov 27, 2017
Copy the specified enumerable properties (strings or symbols) from the source object to the destination object
View assignProps.js
function assignProps(source, dest, props) {
const descriptors = {};
props.forEach(name => {
let desc = Object.getOwnPropertyDescriptor(source, name);
if (desc && desc.enumerable) {
descriptors[name] = desc;
}
});
Object.defineProperties(dest, descriptors);
}
@dotproto
dotproto / default-params.js
Created Nov 22, 2017
Short collection of thoughts on a couple different approaches for default "options" values in a function
View default-params.js
// Static defaults
function fn({a = 1, b = 2} = {}) {
return `${a}, ${b}`
}
fn() // 1, 2
fn({b: 'beta'}) // 1, beta
/**
@dotproto
dotproto / async_playground.js
Created Nov 15, 2017
An async iteration experiment. I was thinking about RxJS-like observables.
View async_playground.js
function clickPromise(el) {
// Create pointers for proimse chain methods
let _resolve = null
let _reject = null
const p = new Promise((resolve, reject) => {
// Cache the promise chain methods for future use
_resolve = resolve
_reject = reject
@dotproto
dotproto / scratchpad.js
Last active Sep 21, 2017
Simple in-browser scratch pad with bookmark-based "saving." To use, copy and paste the this gist into your URL bar. Once loaded, you can save by dragging the link in the top left corner onto your bookmarks bar.
View scratchpad.js
data:text/html,
<!-- See https://gist.github.com/svincent/699c0a9027bb6bc8298b076e638718f1/edit -->
<a id="link" title="Drag this link onto your bookmark bar to save!">save scratchpad</a>
<div id="editor" contenteditable>Type something here!<div>To save, drag the link in the top right onto your bookmark bar.</div></div>
<style>
:root {
--line-height: 1.5em;
}
* {
You can’t perform that action at this time.