Skip to content

Instantly share code, notes, and snippets.

View mxjxn's full-sized avatar
💭
nextjs 13 + prisma + evm everyday

Max Jackson mxjxn

💭
nextjs 13 + prisma + evm everyday
View GitHub Profile
@mxjxn
mxjxn / zip-them-images
Created December 28, 2023 04:28
chatGPT told me how to zip files in the browser.
<!DOCTYPE html>
<html>
<head>
<title>Image Zipper</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.6.0/jszip.min.js"></script>
</head>
<body>
<button id="downloadBtn">Download Images as ZIP</button>
<script>
import Charged from '@charged-particles/sdk'
const charged = new Charged({providers: window.ethereum});
const contractAddress = '0x...';
const tokenId = '123';
const nft = charged.NFT(contractAddress, tokenId);
// This energizes our nft with 47 DAI tokens.
@mxjxn
mxjxn / FlattenedMoviToken2.sol
Created April 6, 2019 01:38
Flattened MoviToken2 solidity contract
// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol
pragma solidity ^0.5.0;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
### Keybase proof
I hereby claim:
* I am mxjxn on github.
* I am mxjxn (https://keybase.io/mxjxn) on keybase.
* I have a public key ASBudt1FiR_IT2NSUQrL-L9BkVB8zTSAns4HJ5hdsy-CIQo
To claim this, I am signing this object:
Verifying my Blockstack ID is secured with the address 1Efc9oaXgWiCPRwJpAzWskHmxny4HRpZ6o https://explorer.blockstack.org/address/1Efc9oaXgWiCPRwJpAzWskHmxny4HRpZ6o
@mxjxn
mxjxn / sketch.sc
Last active November 30, 2017 15:28
mixing sketch in supercollider
s.boot;
s.latency = 1;
(
// FM SYNTH SOUND
SynthDef(\fm1, {
arg freq=440,gate=1,amp=0.5, lagtime=0.05,
ampatk=0.001,ampdec=0.12,ampsus=0.7,amprls=0.01,
modamp=0.8,modratio=0.5,modatk=0.001,moddec=0.3,modsus=0.25,modrls=1,
fampratio=4, ffreq= 150, fatk=0.01, fdec=0.2, fsus=0.4,frls=0.5,out;

Keybase proof

I hereby claim:

  • I am mxjxn on github.
  • I am mxjxn (https://keybase.io/mxjxn) on keybase.
  • I have a public key ASCqUqn3yF72-GCngPGPnXK0gEtbKwEA0StOgU-dCak-Igo

To claim this, I am signing this object:

Verifying that +maxjackson is my blockchain ID. https://onename.com/maxjackson
@mxjxn
mxjxn / delete_ttfm_queue.js
Created July 13, 2012 13:59
delete all but the top ten songs in your ttfm queue... once every 1250ms
var t = setInterval(function(){
var sl = $('.songlist').eq(0);
if (sl.find('.song').length >= 10){
sl.find('.song .remove').eq(10).click();
} else {clearInterval(t)}
}, 1250);
@mxjxn
mxjxn / drone1.rtf
Created April 9, 2012 00:12
Supercollider Random Sine Wave Drone Experiment
(
// every time you run this it will sound slightly different.
var d_def = SynthDef( 'drone1',
{|freq = #[50,100,175], out=#[0,1]|
// four random frequency rates, distributed [L, R, L, R]
// amplitudes also oscillating with random Hz values between 0.1 and 0.4
var synth = SinOsc.ar([50.rrand(200),50.rrand(100),50.rrand(100),75.rrand(125)],
0,
{0.1.rrand(0.4)*LFPar.kr(0.1.rrand(1.6),0,1)}!4);