Skip to content

Instantly share code, notes, and snippets.

View console.sailing.js
console.sailing = function () {
var pos = 0;
setInterval( function() {
clear();
var line1 = '';
var line2 = '';
for( var i = 0; i < pos; i++ ) {
line1 += ' ';
line2 += ' ';
}
@murilopolese
murilopolese / yolo
Last active Aug 29, 2015
Yolo Deploy
View yolo
#!/bin/bash
git add -A && git commit -m "yolo" && git push $1 $2
@murilopolese
murilopolese / editthispage
Created Oct 22, 2014
MdWiki Edit this page link
View editthispage
$(document).ready(function(){
var hash = window.location.hash.replace('#!', '' );
var locale = window.location.pathname.replace('/wiki/', '');
var github = 'https://github.com/KidsHackDay/wiki/edit/gh-pages/';
var link = $( '<a/>', {
href: github + locale + hash,
text: 'Edit this page'
});
var container = $( '<div/>', {
'class': 'container'
@murilopolese
murilopolese / scroll.js
Created Dec 2, 2014
JQuery Page Scroll
View scroll.js
var body = $("html, body");
body.animate({scrollTop:0}, '500', 'swing', function() {
alert("Finished animating");
});
@murilopolese
murilopolese / strawrm.js
Created Mar 19, 2015
Strawbees arm servo calculations
View strawrm.js
var l = 17;
var toDegrees = function( radians ) {
return radians * ( 180 / Math.PI );
}
var toRadians = function( degrees ) {
return degrees * ( Math.PI / 180 );
}
// Polar magnitude
@murilopolese
murilopolese / .zshrc
Created Aug 15, 2015
Docker zsh env magic
View .zshrc
if docker-machine status boot2docker | grep Running > /dev/null; then
eval "$(docker-machine env boot2docker)"
fi
@murilopolese
murilopolese / Instagram
Last active Nov 12, 2015
Processing Instagram Fetcher
View Instagram
import http.requests.*;
class Instagram {
private String accessToken = "508806944.c6cb753.2088e0733e0d432689efc5fcd15bb3b0";
private String tag = "nofilter";
private JSONArray posts;
private ArrayList<PImage> images;
private String imageFormat = "jpg";
private int imageListSize = 100;
@murilopolese
murilopolese / game.p8
Last active Jul 10, 2016
PICO-8 Boilerplate
View game.p8
pico-8 cartridge // http://www.pico-8.com
version 8
__lua__
-- game boilerplate
-- by murilo
-- Game states
game_mode = "splash"
-- Event manager
@murilopolese
murilopolese / package.json
Last active Oct 25, 2016
Simplest static file node server (Heroku ready)
View package.json
{
"name": "http-server-app",
"version": "0.0.1",
"description": "",
"scripts": {
"start": "./node_modules/.bin/http-server"
},
"dependencies": {
"http-server": "*"
},
@murilopolese
murilopolese / JibberJabberGenerator.html
Last active Nov 9, 2016
The Fabulous Jibber Jabber Generator
View JibberJabberGenerator.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>The Fabulous Jibber Jabber Generator</title>
<script type="text/javascript">
validchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()_/!$";
tab0 = new Array(
"Dear friends, ",