Skip to content

Instantly share code, notes, and snippets.

View raphaelbastide's full-sized avatar
↪️
Recent code is on gitlab: https://gitlab.com/raphaelbastide/

Raphaël Bastide raphaelbastide

↪️
Recent code is on gitlab: https://gitlab.com/raphaelbastide/
View GitHub Profile
@raphaelbastide
raphaelbastide / modul goto()
Created August 27, 2013 23:27
thx bpierre
var activeGoto = false;
var posGoto = [0,0];
function goto() {
var c = modul.coordinates();
if (c[0] > posGoto[0]) {
modul.move("left");
} else if (c[0] < posGoto[0]) {
modul.move("right");
}
if (c[1] > posGoto[1]) {
@raphaelbastide
raphaelbastide / modul com()
Last active December 21, 2015 19:49
modul comunication function
// emission
function com(msg){
var siblingModuls = modul.sonar();
if(siblingModuls.length === 0){
ui.log("Nothing sent, you seem alone…");
}else{
var modul1 = siblingModuls[0];
var modulimg = modul1.image();
modul1.send(msg);
ui.log("Your modul sent “"+msg+"”");
@raphaelbastide
raphaelbastide / gist:4959599
Last active December 13, 2015 18:58
Hubot appologies
# Description:
# Makes Hubot appologies for its stupidness
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@raphaelbastide
raphaelbastide / README
Created January 14, 2013 22:50
RVB vibrations
RVB vibrations effect for text
@raphaelbastide
raphaelbastide / README
Created January 14, 2013 22:31
<audio> + random + autoplay
<audio> + random + autoplay
@raphaelbastide
raphaelbastide / README
Created January 14, 2013 21:58
jQuery Olive
# Olive
A minimal image enlarger
[Demo](http://jsrun.it/rooofl/otwP)
@raphaelbastide
raphaelbastide / raphael.default.js
Created June 12, 2011 14:06
Public modul packs
var ctx = modul.context;
function skin_Default() {
ctx.clearRect(0,0,50,50);
// modul.io DEFAULT SKIN
ctx.beginPath();
// Here is a trick to random the modul's color:
ctx.fillStyle="rgba(" + Math.floor( Math.random() * 255) + "," + Math.floor( Math.random() * 255) + "," + Math.floor( Math.random() * 255) + ",1)";
//eyes
ctx.fillRect(12,3, 4, 4);