Skip to content

Instantly share code, notes, and snippets.

View SableRaf's full-sized avatar

Raphaël de Courville SableRaf

View GitHub Profile
@jesi-rgb
jesi-rgb / p5.save-gif.js
Last active October 21, 2022 01:42
saveGif is coming to p5.js! 🌸
This file has been truncated, but you can view the full file.
/*! p5.js v1.4.1 July 26, 2022 */
"use strict";function _typeof3(e){return(_typeof3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof3(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).p5=e()}}(function(){var a,e,t;return function a(i,s,l){function p(t,e){if(!s[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=s[t]={exports:{}};i[t][0].call(o.exports,function(e){return p(i[t][1][e]||e)},o,o.exports,a,i,s,l)}return s[t].exports}for(var c="function"==typeof require&&require,e=
@mattdesl
mattdesl / pinning.md
Last active January 28, 2023 19:56
hicetnunc IPFS pinning

Hicetnunc.xyz IPFS Pinning

💡 These steps will become easier, less technical, and more accessible as more open tools begin to emerge around Hicetnunc pinning. The steps below assume macOS but should work similarly across other platforms. This gist can be seen as a working draft toward more polished documentation; if you see any issues please post a comment below.

Basic Idea

Hicetnunc.xyz aims to be "decentralized" which means the OBJKTs are owned by the users, not the platform. So, in theory, if hicetnunc disappears, another marketplace could emerge on the same (user-owned) assets. But, this paradigm of decentralization means that you own the assets; so the responsibility to maintain them lies on the users, not the platform.

Of course, hicetnunc and some of its users will probably also make an effort to help maintain all the assets on its platform; but you should not rely purely on that, as it goes against the core ethos of dec

@ofZach
ofZach / gist:d67d2ab2a0aa183b7d34f72263d5c5bd
Created November 27, 2017 07:44
looping 1d noise (tiling)
ofPolyline temp;
float ff = ofGetElapsedTimef();
for (int i = 0; i < 100; i++){
float angle = ofMap(i, 0, 100, 0, TWO_PI);
ofPoint pt= ofPoint(400,400);
float radius = 200 + ofSignedNoise(ff*0.1, cos(angle)*0.3, sin(angle)*0.3) * 100;
pt += radius * ofPoint(cos(angle), sin(angle));
temp.addVertex(pt);
}
temp.setClosed(true);
@daan
daan / jpeg.pde
Last active September 27, 2020 04:57
Super simple streaming video (mjpeg) in processing over an oscP5 tcp link.
/*
a simple jpeg encoder / decoder class
based on java standard libraries.
USAGE:
byte[] b = compressJpg(img,0.5);
PImage imgCompressed = decompressImage(b);
0.0 100% compression
@narner
narner / MachineLearningResourcesAndTools.md
Last active March 27, 2016 15:29
Machine Learning Resources and Tools
@border
border / googleFinance.py
Created October 28, 2011 07:03
Access Stock Quotes Realtime through Google Finance
import urllib2
import json
import time
# Form: http://digitalpbk.com/stock/google-finance-get-stock-quote-realtime
class GoogleFinanceAPI:
def __init__(self):
self.prefix = "http://finance.google.com/finance/info?client=ig&q="
def get(self,symbol,exchange):