Skip to content

Instantly share code, notes, and snippets.

View livacengiz's full-sized avatar
🥂

Liva livacengiz

🥂
View GitHub Profile
//
// defino mis variables
let cc = Array(128).fill(0)
let notes = Array(128).fill(0)
let lastCc = 0
let lastNote = 0
let lastOctave = 0
let lastRelNote = 0
//
// declaro un handler de eventos midi
@myshov
myshov / function_invocation.js
Last active January 21, 2024 15:14
11 Ways to Invoke a Function
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@tsulej
tsulej / harmonograph.pde
Created March 23, 2017 12:42
Harmonograph + noise
// http://generateme.tumblr.com
// Harmonograph with noise
// space - save
// click - change
float time;
float f1,f2,f3,f4;
float p1,p2,p3,p4;
float a1,a2,a3,a4;
@jesstelford
jesstelford / Links in markdown.md
Last active June 6, 2022 13:56
Putting links in code blocks on GitHub
@hzulla
hzulla / sonicpi-crash-course.txt
Last active May 9, 2023 09:25
Crash into Sonic Pi: Learn to code music in less than 30 minutes
# -------------------------------------------
# CRASH INTO SONIC PI!
# Learn to code music in less than 30 minutes
# -------------------------------------------
# - download Sonic Pi from sonic-pi.net
# - copy and paste these code snippets
# - change and experiment with the snippets
# - go!
# -------------------------------------------
# These snippets were made for a workshop to
@asafge
asafge / ng-really.js
Created November 12, 2013 13:06
ng-really? An AngularJS directive that creates a confirmation dialog for an action.
/**
* A generic confirmation for risky actions.
* Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function
*/
angular.module('app').directive('ngReallyClick', [function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
var message = attrs.ngReallyMessage;