This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <AutoItConstants.au3> | |
$size = 0 | |
; center horizontal of your screen | |
$centerX = @DesktopWidth / 2 | |
; center vertical of your screen | |
$centerY = @DesktopHeight / 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <AutoItConstants.au3> | |
; THESE 3 VARS ARE ALL YOU NEED LOL | |
; starting branch length | |
$startLength = 350 | |
; angle to twist the tree | |
$startAngle = 45 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mido import MidiFile | |
tempo=0 | |
noteons = [] | |
notas = [] | |
mid = MidiFile('C:/scripts-python/meow.mid') | |
for evt in mid: | |
if not evt.is_meta: | |
tempo += evt.time | |
if evt.type == 'note_on': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var context = new AudioContext(); | |
var oscillator = context.createOscillator(); | |
var gainNode = context.createGain(); | |
oscillator.connect(gainNode); | |
gainNode.connect(context.destination) | |
oscillator.start(); | |
stopButton.addEventListener('click', function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends RigidBody2D | |
var f = 500 | |
func _ready(): | |
apply_central_impulse(Vector2(rand_range(-f, f),rand_range(-f,f))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hex = (num) => num.toString(16).padStart(2, '0') | |
const num = (hex) => parseInt(hex, 16) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const hex = (d) => Number(d).toString(16).padStart(2, '0') | |
const rnd = () => Math.floor(Math.random() * 256) | |
let color = hex(rnd()) + hex(rnd()) + hex(rnd()) | |
const gen = () => color = hex(rnd()) + hex(rnd()) + hex(rnd()) | |
</script> | |
<style> | |
.color{display:inline-block; padding:24px; border-radius:50px; vertical-align: middle;} | |
.text{display:inline-block; font-size:24px; vertical-align: middle;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"keys": { | |
"0": "C-1", | |
"1": "C#-1", | |
"2": "D-1", | |
"3": "D#-1", | |
"4": "E-1", | |
"5": "F-1", | |
"6": "F#-1", | |
"7": "G-1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Is x really array? | |
Array.isArray(x) | |
// Add array y to the end of x | |
x.concat(y) | |
// Is y in x? | |
x.includes(y) | |
// Which index is y? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// object to css | |
Object.prototype.css = function() {return Object.entries(this).map(([k, v]) => `${k}:${v}`).join(';')} | |
// css to object | |
String.prototype.obj = function() { | |
let obj = {} | |
let parts = this.split(";") | |
for(let part of parts){ | |
let prop = part.split(':') | |
obj[prop[0]] = prop[1] |
OlderNewer