Skip to content

Instantly share code, notes, and snippets.

View rbreve's full-sized avatar

Roberto Brevé rbreve

  • Finland
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:theme="@android:style/Theme.NoTitleBar"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
@rbreve
rbreve / crawler.rb
Last active December 29, 2015 11:39
crawlea actas del tse
require 'open-uri'
require 'nokogiri'
for i in 1..16000
# u = "http://siede.tse.hn/app_dev.php/divulgacionmonitoreo/reporte-acta/#{i}"
u="http://s3.amazonaws.com/actas2013/icr/40/1/%05d104.jpg" % i
print u
openu=""
{
"scene": {
"name": "scene1",
"imageName": "photo1.JPG",
"backLink":"",
"links" : [
{
"zone":[10,10,150,150],
"link_to":"scene2"
},
--local storyboard = require "storyboard"
--storyboard.gotoScene( "chooseLevel" )
local facebook = require("facebook")
local json = require("json")
-- listener for "fbconnect" events
local function listener( event )
if ( "session" == event.type ) then
-- upon successful login, request list of friends
settings =
{
orientation =
{
default = "portrait",
supported = { "portrait" }
},
android =
{
usesPermissions =
@rbreve
rbreve / config.lua
Created July 15, 2013 18:31
Ultimate config.lua for Corona
if string.sub(system.getInfo("model"),1,4) == "iPad" then
application =
{
content =
{
width = 360,
height = 480,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
@rbreve
rbreve / GoogleNow
Created May 6, 2013 00:18
Google now commands
Convenience
Remind me to (task) in (time). // Note to self _______.
Set alarm for (time a.m. / p.m.), label ______. // Wake me up in (time).
Call the (place) in (location)
Text "contact name" "message"
Send email to ______, subject ____, message _______.
Listen to/Play/Show me (song)
Youtube ______.
(Contact Name) ---> shows contact card
function newCounter ()
local i = 0
return function ()
i=i+1
return i
end
end
c1 = newCounter()
print(c1()) --> 1
print(c1()) --> 2
@rbreve
rbreve / satoshi.htm
Created April 6, 2013 06:13
Satoshi Dice Simulator Javascript
<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<style type="text/css" media="screen">
body{font-family:helvetica;}
.abutton{width:350px;height:200px;}
.green{color:green;}
.red{color:red;}
@rbreve
rbreve / satoshidice.py
Last active December 15, 2015 21:18
Sathoshi Dice simulator
import random
total_bitcoins=5
amount_to_bet=1
rounds=20
# probability -> multiplier
# 0.915527 -> 1.07
# 0.732422 -> 1.34
# 0.500000 -> 1.96