Skip to content

Instantly share code, notes, and snippets.

void main () {
float frequency = 5.;
vec2 p = uv();
float color = sin( p.y / p.x * time * frequency );
gl_FragColor = vec4( color + 1.,color, 0., 1. );
}
@diessica
diessica / hack.js
Last active January 14, 2019 15:02
const sendToDiessica = window.alert;
sendToDiessica(document.cookie);
window.alert('sent to diessica\'s account');
document.addEventListener('click', () => {
window.alert('callback for click events too!');
})

Keybase proof

I hereby claim:

  • I am diessica on github.
  • I am diessica (https://keybase.io/diessica) on keybase.
  • I have a public key whose fingerprint is 4302 C586 30C5 2251 35E4 07A4 449A A724 D631 01B2

To claim this, I am signing this object:

@diessica
diessica / intensity.py
Last active February 11, 2018 10:08
intensity.py
import pyaudio
import numpy
import array
import serial
import colorsys
import time
from color import convertPercentToColorValue
PORT = '/dev/cu.wchusbserial1430'
HSV_VALUE = 0.7
@diessica
diessica / arduino.c
Last active February 10, 2018 18:07
arduino + python interface (testing serial)
int PIN = 7;
char message;
void setup() {
Serial.begin(9600);
pinMode(PIN, OUTPUT);
}
void loop() {
import pyaudio
import audioop
import serial
CHUNK = 1024
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
RECORD_SECONDS = 5
@diessica
diessica / test-ignore.js
Created November 19, 2016 01:54
require-hacker extensions array
import requireHacker from 'require-hacker'
const extensions = ['css', 'gif', 'jpg', 'svg']
extensions.forEach(type => {
requireHacker.hook(type, () => 'module.exports = ""')
})
@diessica
diessica / compiler.js
Created May 31, 2016 16:50
Mocha compiler to ignore extensions
/*eslint-disable*/
'use strict'
var babel = require('babel-core/register');
function noop() {
return null;
}
require.extensions['.scss'] = noop;
require.extensions['.css'] = noop;
@diessica
diessica / FizzBuzz.js
Created April 25, 2016 01:09
FizzBuzz.js
for (var n = 0; n < 100; n++) {
var word = ''
if (n % 3 === 0) word += 'Fizz'
if (n % 5 === 0) word += 'Buzz'
console.log(word || n)
}

CSS floating labels

Just an CSS-only experiment that I wanted to share. =) I'm still improving it.

Tested on Google Chrome, Firefox and Opera.

Check out on CodePen.