This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>HTML5 Rain</title> | |
<script type="text/javascript"> | |
// this is an example for a rain function, to draw rain | |
// in a jRPG Top-Down type of game. | |
var canvas = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2015 Erico Vieira Porto | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First example on image processing | |
// Finds the square with bigger difference from the latter | |
// Do it for both cams | |
// Guess that it's in the same object | |
// Tell the distance from the object | |
// Prototype to be further rewritten in OpenCV | |
// This code uses snippets form this great german website: | |
// http://www.creativecoding.org/lesson/topics/video/video-in-processing | |
// Aktivität in Bildbereichen feststellen in Processing | |
import processing.video.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Very simple HTTP server and client pair in python. | |
Server based on: https://gist.github.com/bradmontgomery/2219997 | |
Usage:: | |
./server-http.py start [<port>] | |
Send a message (on a second terminal) :: | |
./server-http.py notify "hello world!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# one nice dude in the internet asked me for help to make this code work | |
# I leave this code here as a reminder of that nice dude. The content here | |
# belongs to nice dude, and not me. | |
import sys, traceback | |
import json | |
userQuited = False | |
def _quit(dummy): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Web Client to consume Open WeatherMap web service | |
This sketch connects to a website (http://api.openweathermap.org) | |
using an Arduino Ethernet shield and get data from site. | |
Circuit: | |
* Arduino MEGA 2560 R3 Board | |
* Ethernet shield attached to pins 10, 11, 12, 13 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple 'game' for Processing (tested with Processing 2.2.1) | |
// use ARROW KEYS to move | |
// this will be the pointers I'm going to use to sweep my map, | |
// and it's limit. | |
int xi, yi; | |
int i = 0; | |
int sceneHeight = 10; | |
int sceneWidth = 20; | |
// This is the "hero" coordinate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// An easy way to generate random text from easy to type text | |
// | |
// Use "word word [possibility1|possibilities stuff|another stuff thing] stuff" | |
//to make a string with possibilities. | |
// Example: | |
// | |
//> var t = "A [greekish|futuristic|antique] world with a [dinossaur|ninja] flying" | |
//> console.log(randtext(t)) | |
//A antique world with a dinossaur flying | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run this script WITHOUT Sudo. | |
# This script assumes you have installed transmission-daemon | |
# on your Raspberry Pi (or whatever where you are running it...) | |
# Running it will use cron to pause and unpause all your torrents | |
# at specific times. | |
# Right now you, no torrents will be downloaded from 5 am to 9 am and | |
# also no torrents will be downloaded from 5 pm to 11 pm. | |
THISFOLDER=`pwd` |
OlderNewer