Skip to content

Instantly share code, notes, and snippets.

Install python and pip:
apt install snapd
snap install python38 --classic
apt install python3-pip
nano ~/.bashrc
# Add into the bottom
alias python=python3
alias pip=pip3
# Save & Exit ctrl+s and ctrl+x
@moumar
moumar / README.md
Created October 23, 2015 18:12 — forked from mbostock/.block
Merging States II

A variation of merging polygons, this time using careful rendering rather than topological manipulation.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moumar
moumar / smokey.pde
Created September 18, 2011 12:41
Smokey
float x_noise, y_noise, radius_noise, angle_noise, angle;
float ellipse_radius_noise_x, ellipse_radius_noise_y;
float max_ellipse_radius;
float radius_range, radius_range_noise;
float dimension = 800; // this dimension is constant
void setup() {
//size(4200, 4200, JAVA2D);
size(800, 800, JAVA2D);
# test whether +path+ is a valid and supported audiofile
def is_audio_file?(path)
begin
AudioInfo.new(path) rescue false
return true
rescue AudioInfoError
return false
end
end
#!/usr/bin/ruby
# inkscape -b '#ffffff' -e circles.png -w 3000 circles.svg
# gem install color-tools
require 'color'
# http://code.google.com/p/chipmunk-physics/
# svn checkout http://chipmunk-physics.googlecode.com/svn/trunk/ chipmunk-physics-read-only
# cmake -D BUILD_RUBY_EXT=ON .
# make && sudo make install
# rp5
load_library 'opengl'
import "processing.opengl"
def setup
size 640, 480, OPENGL
smooth
end
def draw
@moumar
moumar / gist:91256
Created April 7, 2009 14:31
ruby-processing opengl bug on linux
require "ruby-processing"
class BugOpengl < Processing::App
load_library 'opengl'
import "processing.opengl"
def setup
render_mode OPENGL
#render_mode P3D
smooth