Skip to content

Instantly share code, notes, and snippets.

@murilopolese
murilopolese / console.sailing.js
Created September 11, 2014 12:23
I miss sailing
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 August 29, 2015 14:06
Yolo Deploy
#!/bin/bash
git add -A && git commit -m "yolo" && git push $1 $2
@murilopolese
murilopolese / editthispage
Created October 22, 2014 22:37
MdWiki Edit this page link
$(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 / package.json
Last active October 25, 2016 23:25
Simplest static file node server (Heroku ready)
{
"name": "http-server-app",
"version": "0.0.1",
"description": "",
"scripts": {
"start": "./node_modules/.bin/http-server"
},
"dependencies": {
"http-server": "*"
},
@murilopolese
murilopolese / scroll.js
Created December 2, 2014 15:58
JQuery Page Scroll
var body = $("html, body");
body.animate({scrollTop:0}, '500', 'swing', function() {
alert("Finished animating");
});
@murilopolese
murilopolese / strawrm.js
Created March 19, 2015 23:26
Strawbees arm servo calculations
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 August 15, 2015 17:58
Docker zsh env magic
if docker-machine status boot2docker | grep Running > /dev/null; then
eval "$(docker-machine env boot2docker)"
fi
@murilopolese
murilopolese / Instagram
Last active November 12, 2015 10:00
Processing Instagram Fetcher
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 / JibberJabberGenerator.html
Last active November 9, 2016 16:57
The Fabulous Jibber Jabber Generator
<!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, ",
@murilopolese
murilopolese / game.p8
Last active July 10, 2016 09:00
PICO-8 Boilerplate
pico-8 cartridge // http://www.pico-8.com
version 8
__lua__
-- game boilerplate
-- by murilo
-- Game states
game_mode = "splash"
-- Event manager