Skip to content

Instantly share code, notes, and snippets.

@jupapios
jupapios / s3-objects-migration.mjs
Created December 12, 2023 12:52
Migrate s3 objects to support being embedded.
import {
CopyObjectCommand,
HeadObjectCommand,
ListObjectsV2Command,
S3Client,
} from "@aws-sdk/client-s3";
const client = new S3Client({
credentials: {
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,

Keybase proof

I hereby claim:

  • I am jupapios on github.
  • I am juanpinilla (https://keybase.io/juanpinilla) on keybase.
  • I have a public key ASDX_xBJhKfCB1Ca_psir6YxnLHUB6nSzhXnm8plvfLtewo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am gotik on github.
  • I am juanpinilla (https://keybase.io/juanpinilla) on keybase.
  • I have a public key whose fingerprint is 427E 66E6 8BA4 6130 52F2 0C34 A181 5037 5DD1 FD90

To claim this, I am signing this object:

@jupapios
jupapios / hzToColor.js
Created October 2, 2012 03:46
Hz to Color (le sound :))
// magic :)
function octaveUp(hz) {
return Math.pow(2,40)*hz;
}
function hzToWav(hz) {
return c/hz;
}
function wav2RGB(wavelength) {
var w = parseInt(wavelength);