Skip to content

Instantly share code, notes, and snippets.

View setphen's full-sized avatar

Stephen Lindberg setphen

View GitHub Profile
@setphen
setphen / response.json
Last active November 13, 2023 17:17
testing a thing
{
"firstName": "Fiesteban"
}
@setphen
setphen / illustration_component.js
Created November 3, 2021 13:38
Illustration Component Macro (Figma)
function clone(val) {
return JSON.parse(JSON.stringify(val))
}
async function createScribble(node) {
let t = await node.exportAsync()
let newImage = figma.createImage(t)
let f = figma.createFrame()
f.fills = []
let rect = figma.createRectangle()
f.x = node.x
@setphen
setphen / gist:3988fffe9b6e58c0a30605d704d38ac9
Created February 21, 2021 23:58
uBlock Youtube element blocklist
www.youtube.com##[page-subtype="home"]
www.youtube.com##ytd-watch-next-secondary-results-renderer
@setphen
setphen / config.toml
Created February 13, 2021 17:46
Hugo gemini configuration
[mediaTypes]
[mediaTypes."text/gemini"]
suffixes = ["gmi"]
[outputFormats]
[outputFormats.Gemini]
name = "gemini"
mediaType = "text/gemini"
basename = "index"
isPlainText = true
@setphen
setphen / stack.scss
Created December 30, 2020 16:57
Stack utility
$spacing: 1rem;
.stack {
align-items: flex-start;
display: flex;
flex-wrap: wrap;
margin-left: -$spacing;
margin-top: -$spacing;
> * {
@setphen
setphen / favicon.html
Created August 29, 2020 01:16
On-the-fly favicons, using svg, emoji (for Hugo)
{{ with (default ":black_circle:" .Params.favicon) }}
<link rel="icon" href="data:image/svg+xml,<svg
xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text
y=%22.9em%22 font-size=%2290%22> {{ emojify . }} </text></svg>">
{{ end }}
@setphen
setphen / crumbs.html
Created February 7, 2020 15:53
A simple recursive breadcrumb component for Hugo
<span>
{{ if .IsHome }}
<a href="/">Home</a>
{{ else }}
{{ partial "crumbs" .Parent }}
/ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{ end }}
</span>
@setphen
setphen / serve.sh
Created December 14, 2019 19:09
Simple function to serve a folder locally
# serving folder
serve() {
if [[ $# -gt 0 ]]; then
(sleep 1 && open http://localhost:$1) & python3 -m http.server $1
else
(sleep 1 && open http://localhost:8181) & python3 -m http.server 8181
fi
}
Attack/Decay/Sustain/Release: self-explanatory
Three-band EQ: For isolating Hi/Mid/Lo (This could be high/lowpass filter, alternatively)
Alter pitch: For tuning samples
Pitch bend: Change the pitch throughout length of the sample (for bass drum dips/rises, eg)
Shaper: Some sort of distortion filter to emphasize certain frequencies and get a little fuzz or character
@setphen
setphen / gist:4a3236728fa0eab16cbd2504d7d0b70e
Created June 4, 2019 16:28 — forked from lmccart/gist:2273a047874939ad8ad1
p5.js + p5.dom.js + clmtracker.js
<html>
<head>
<script src="clmtrackr.js"></script>
<script src="model_pca_20_svm.js"></script>
<script src="p5.js"></script>
<script src="p5.dom.js"></script>
<script>
var ctracker;