Skip to content

Instantly share code, notes, and snippets.

View pote's full-sized avatar

pote pote

View GitHub Profile
@pote
pote / DiceApp.rb
Created October 11, 2009 22:26
Just a simple Dice throwing app - I plan on adding a Shoes GUI later :)
class Dice
def initialize(sides)
@sides = sides
end
def throw(times)
rolls = []
times.times do |c|
rolls << rand(@sides) + 1
@pote
pote / planet.yml
Created May 21, 2012 18:15
default planet.yml file to test planet.rb against different blogging engines
## Planet.rb default config file, modify it and spawn awesomeness!
planet:
posts_directory: source/_posts/
templates_directory: source/_layouts/
blogs:
- author: "Pablo Astigarraga"
feed: "http://blog.poteland.com/atom.xml"
image: "http://poteland.com/images/avatars/red_mage.png"
package main
import "fmt"
import uuid "github.com/nu7hatch/gouuid"
import (
"fmt"
uuid "github.com/nu7hatch/gouuid"
)
go func() {
for i := 1; i < 100; i++ {
fmt.Println(i)
}
}()
go SomeMotherfuckingExpensiveLoop()
go AnotherMotherfuckingLoop()
// app is keep going here...
@pote
pote / optimal_hours.rb
Created November 8, 2012 19:19
Simple script to calculate how far from my target hours whenever I want to.
require 'date'
today = Date.today
beginning_of_month = Date.parse("#{today.year}-#{today.month}-1")
workable_days_until_now = (beginning_of_month..today).reject { |d| d.saturday? || d.sunday? }.count
optimum_hours_until_now = workable_days_until_now * 6
puts "Workable days until now: #{ workable_days_until_now }"
puts "Optimum hours until now: #{ optimum_hours_until_now }"
@pote
pote / bio.md
Last active December 11, 2015 06:09
Mini bio for CFPs

My name is Pablo Astigarraga, I currently work at Citrusbyte doing mostly cool Ruby stuff for the web.

I come from a Python background, dislike the term “hacking” and find joy in working with Ruby, contributing to the open source ecosystem or just generally building pretty stuff. I like doing new stuff that I have absolutely no experience with so I can learn to better myself, from playing soccer to make a fool of myself trying inline skating or cranking out a side project with a new programming language.

You can stalk me at @poteland in twitter, github.com/pote or poteland.com and check out my previous talks at speakerdeck.com/pote.

@pote
pote / promise.rb
Created March 8, 2013 01:02
Promises are Futures.
require 'celluloid'
class Politician
include Celluloid
def lower_taxes
# Try really hard to do this
result_of_complicated_code = [true, false].sample
yield result_of_complicated_code

Estamos

  • Nacho
  • Pote
  • Bruno
  • Chris Polaco
  • Lau
  • Agustin Haller
  • Dayana Jabif

Posibles

@pote
pote / short_bio.md
Last active December 16, 2015 11:29
Short Bio for conferences

Pablo Astigarraga (better known as PoTe) comes from a Python background writing Asterisk-based VoIP systems, has several years of experience doing Rails/Ruby, contributing to open source projects and currently works for an amazingly fun startup called Vivid Cortex.

Passionate about minimalistic software, Unix philosophy, doing things right, having fun with cool people and using spaces instead of tabs, pote copes with a somewhat unhealthy relationship with mustaches and is always willing to discuss the evils of premature optimization over a beer.

@pote
pote / app.rb
Last active December 17, 2015 04:28
Proof of concept using Class Table Inheritance
require 'sequel'
DB = Sequel.connect 'sqlite://database.db'
class Person < Sequel::Model
# has age, name, type
end
Person.plugin :class_table_inheritance, key: :type