Skip to content

Instantly share code, notes, and snippets.

View bobvanluijt's full-sized avatar

Bob van Luijt bobvanluijt

View GitHub Profile
@bobvanluijt
bobvanluijt / microtonal.js
Created June 7, 2020 18:52
Microtonal JS
// https://pages.mtu.edu/~suits/notefreqs.html
// https://pages.mtu.edu/~suits/NoteFreqCalcs.html
// create web audio api context
var audioCtx = new(window.AudioContext || window.webkitAudioContext)();
// microtonal division
var microtonalDiv = 24;
var c4 = 261.6256;
@bobvanluijt
bobvanluijt / Weaviate-vector.ho
Created May 8, 2020 14:36
Example of Weaviate vector generator
// takes an array of vectors and outputs a single mean vector
function meanVector(inputVectors) {
// sum up each dimension in a single “sum” vector
sums = new Array(dimensions(inputVectors))
for i = 0; i < dimensions(inputVectors); i ++ {
for j = 0; j < inputVectors.length(); j ++ {
sums[i] += inputVectors[j][i]
}
}
@bobvanluijt
bobvanluijt / synthwaveglow.md
Created February 16, 2020 18:24 — forked from sbinlondon/synthwaveglow.md
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"

@bobvanluijt
bobvanluijt / Logics.md
Created February 11, 2020 12:07
Logics

Logic

Categorical Logic

Propositional Logic

variables

  • q
@bobvanluijt
bobvanluijt / gist:866547300a3acbe2c24fba12ff8ef67f
Last active January 3, 2020 21:05
Wget websites from SeMI PoV
wget --recursive --quiet --level=0 -U "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --directory-prefix="collection/" --follow-tags=a -H semi.technology
$ docker container rm $(docker container ls -aq) && docker image prune -af
@bobvanluijt
bobvanluijt / utf8-lowercase.py
Created September 2, 2019 11:45
List of UTF-8 lowercase characters in Python 3
def printIfLower(i):
s = chr(i)
if s.islower():
if s is not None:
print(s)
for x in range(1, 125251):
printIfLower(x)
@bobvanluijt
bobvanluijt / Operator for And and And Or operations.graphql
Created June 13, 2019 11:28
Operator for And and And Or operations
{
Local{
Get{
Things{
Place(where:{
operator:And
operands:[
{
operator:Equal
path:["rating"]
@bobvanluijt
bobvanluijt / setup-docker.sh
Last active January 31, 2023 20:16
Setup Docker
sudo apt-get update && \
sudo apt-get -qq -y upgrade && \
sudo apt-get -qq -y install \
apt-transport-https \
ca-certificates \
curl \
jq \
software-properties-common && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
sudo add-apt-repository \
@bobvanluijt
bobvanluijt / emptyWeaviate.py
Created May 2, 2019 18:36
Remove all concepts from Weaviate
##
# This script removes all things and action (i.e., concepts) from a Weaviate.
#
# Make sure to set the WEAVIATE_URL
##
import requests
from datetime import datetime
WEAVIATE_URL = "localhost"
HEADERS = {'Content-type': 'application/json'}