Skip to content

Instantly share code, notes, and snippets.

View MAKIO135's full-sized avatar
💭
🎛

Lionel RADISSON MAKIO135

💭
🎛
View GitHub Profile
import smartpy as sp
class SpectrumColors(sp.Contract):
def __init__(self):
self.init(
# fixed dimensions of the board
columns = 16,
rows = 16,
# limit to the total number of colors possible
max_colors = 12,
@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

@simenbrekken
simenbrekken / schema.js
Created December 21, 2016 14:06
Firebase backed GraphQL schema
import firebase from 'firebase'
import { filter, map } from 'lodash'
import { makeExecutableSchema } from 'graphql-tools'
firebase.initializeApp({
databaseURL: 'https://grafire-b1b6e.firebaseio.com',
})
const mapSnapshotToEntity = snapshot => ({ id: snapshot.key, ...snapshot.val() })
const mapSnapshotToEntities = snapshot => map(snapshot.val(), (value, id) => ({ id, ...value }))
@darinwilson
darinwilson / SonicPiDrumMachine
Last active March 2, 2024 20:11
Sonic Pi Drum Machine
#########################################
## Sonic Pi Drum Machine
## coded by Darin Wilson
##
use_bpm 95
in_thread(name: :drum_machine) do
# choose your kit here (can be :acoustic, :acoustic_soft, :electro, :toy)
@emlyn
emlyn / innovation1.rb
Created October 9, 2015 11:50
Sonic Pi
use_bpm 180
use_random_seed 42
live_loop :drum do
a,b = [[:Ab,:major], [:F, :minor], [:C, :minor], [:G, :minor]].choose
cue :key, a: a, b: b
if true then
with_fx :reverb do
4.times do
sample :drum_tom_mid_hard, amp: ring(4,2,3,2).tick
@xavriley
xavriley / README.md
Last active December 30, 2023 12:17
Original NES Mario Theme for Sonic Pi

Making Chiptune Music using Sonic Pi v2.0

Warning: this might not work on a RaspberryPi yet

I was curious about making retro gaming sounds using Sonic Pi. A couple of months and a lot of Googling later, here's the original Mario Bros theme as it was heard on the NES console.

I'm (just about) old enough to remember rushing home from school to play this game at Philip Boucher's house, sitting cross-legged in front of the TV till my feet got pins and needles. Working out how to recreate it for Sonic Pi was a lot of fun!

Getting the sounds of the NES chip

@kaloprominat
kaloprominat / macos: manage add list remove login items apple script
Last active April 11, 2024 23:22
macos: manage add list remove login items apple script
# applescript
# add login item
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Notes",path:"/Applications/Notes.app", hidden:false}'
# delete login item
osascript -e 'tell application "System Events" to delete login item "itemname"'
# list loginitems
osascript -e 'tell application "System Events" to get the name of every login item'
@banksean
banksean / perlin-noise-classical.js
Created February 15, 2010 10:00
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/