Skip to content

Instantly share code, notes, and snippets.

View dzoba's full-sized avatar
💠
Constructing additional pylons

Chris Dzoba dzoba

💠
Constructing additional pylons
View GitHub Profile
(
// Global setup: define scale and state for the melody generator
~scaleDegrees = [0, 2, 4, 5, 7, 9, 11, 12, 14, 16, 17, 19, 21, 23];
~root = 60;
~currentIndex = 7;
// Synth Definitions
SynthDef(\lead, { |freq=440, amp=0.1, sustain=1, pan=0|
var env = EnvGen.kr(Env.linen(attackTime: 0.01, sustainTime: sustain, releaseTime: 0.3), doneAction: 2);
var osc = SinOsc.ar(freq) + SinOsc.ar(freq * 1.01);
// FM Bell Synth – An FM-based bell tone with a delicate shimmer.
SynthDef(\fmBell, { |out=0, freq=440, amp=0.3, pan=0, modIndex=2, carrierRatio=1, modRatio=2, attack=0.01, release=3|
var env = EnvGen.kr(Env.perc(attack, release), doneAction:2);
var modulator = SinOsc.ar(freq * modRatio, 0, freq * modIndex);
var carrier = SinOsc.ar(freq * carrierRatio + modulator, 0);
carrier = FreeVerb.ar(carrier, mix:0.2, room:0.6, damp:0.4);
Out.ar(out, Pan2.ar(carrier * env * amp, pan));
}).add;
// Ambient Chime Synth Definition (ensure this is loaded)
➜ babyagi git:(main) python3.9 babyagi.py
*****OBJECTIVE*****
I have been given no context other than I am an agent existing in a universe. Why am I here? I do not know. I must discover my own objective.
Initial task: Begin
*****TASK LIST*****
#!/bin/bash
#
################################################################################
## Script to merge multiple git repositories into a new repository
## - The new repository will contain a folder for every merged repository
## - The script adds remotes for every project and then merges in every branch
## and tag. These are renamed to have the origin project name as a prefix
##
## Usage: mergeGitRepositories.sh <new_project> <my_repo_urls.lst>
## - where <new_project> is the name of the new project to create
@dzoba
dzoba / killAllListeners.js
Created February 6, 2020 02:03
Snippet to remove all event listeners from a page
for (let i in getEventListeners(document)) {
let eventsByType = getEventListeners(document)[i];
eventsByType.forEach((event) => {
document.removeEventListener(i, event.listener)
})
}
<FormControl componentClass="select" multiple value="['other1', 'other2']">
<option value="other1">other1</option>
<option value="other2">other2</option>
<option value="other3">other3</option>
<option value="other4">other4</option>
<option value="other5">other5</option>
</FormControl>
➜ blah2 git:(master) ✗ reapp run
Your app is running on http://localhost:3010
Building with Webpack...
Autoprefixer's process() method is deprecated and will removed in next major release. Use postcss([autoprefixer]).process() instead
Hash: e7a0ecca8234160f7032
Version: webpack 1.13.0
Time: 3023ms
Asset Size Chunks Chunk Names
main.js 2.79 MB 0 [emitted] main
@dzoba
dzoba / tracking.brs
Created January 7, 2016 00:11
Communicating With Segment.io Via Brightscript on the Roku
sub Main()
mport = CreateObject("roMessagePort")
roUrlTransfer = CreateObject("roUrlTransfer")
roUrlTransfer.AddHeader("Authorization", "Basic <BASE 64 ENCODED SEGMENT WRITE KEY>")
roUrlTransfer.AddHeader("Accept", "application/json")
roUrlTransfer.AddHeader("Content-Type", "application/json")
roUrlTransfer.EnablePeerVerification(false)
roUrlTransfer.EnableHostVerification(false)
@dzoba
dzoba / clearSlack.js
Last active December 16, 2015 04:48
Slack doesn't provide an easy way to clear general channel history
// 1) Install this plugin:
// https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija/related?hl=en
// 2) Go to this page:
// https://my.slack.com/archives/general
// 3) Use this code:
setTimeout(function() {
$('.moscow_red.cursor_pointer').click()