Skip to content

Instantly share code, notes, and snippets.

Roberto Pepato rpepato

  • Pepato
  • São José dos Campos, SP - Brazil
Block or report user

Report or block rpepato

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rpepato / fibo_ruby.rb
Created Oct 16, 2015
Memoization in ruby
View fibo_ruby.rb
require 'rubygems'
require 'benchmark'
def fibonacci(n)
return n if n <= 1
fibonacci( n - 1 ) + fibonacci( n - 2 )
@cache = [0,1]
def fibo(n)
rpepato / geocode.html
Last active Aug 29, 2015
Simple demonstration of geocode dijit usage with ArcGIS Javascript API
View geocode.html
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>ArcGIS API for JavaScript | Simple Geocoding</title>
<script src=""></script>
<link rel="stylesheet" href="">
html, body, #map {
rpepato / esri_links
Last active Aug 29, 2015
O que há de novo para desenvolvedores Esri? - Presentation Links
View esri_links
rpepato / routes.js
Last active Aug 29, 2015
Building a route with dynamic barriers using the Esri ArcGIS Javascript API
View routes.js
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Rotas Parametrizáveis</title>
<link rel="stylesheet" href="">
rpepato / gist:5124032
Created Mar 9, 2013
Algorithm to calculate the gray code for a specified number of bits, using recursion in ruby
View gist:5124032
def gray_code_for(number_of_bits)
if number_of_bits == 1
return %w[0 1]
ordered = gray_code_for(number_of_bits - 1)
reversed = ordered.reverse! { |item| "0#{item}"}! { |item| "1#{item}"}
ordered + reversed
rpepato / SampleWebMapping.html
Created Aug 9, 2011
Add a simple map from Google Maps to a web application
View SampleWebMapping.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">
<script src="" type="text/javascript"> <!-- the required library for google maps usage -->
<div id="map" style="width: 500px; height:400px"></div>
<script type="text/javascript">
You can’t perform that action at this time.