Skip to content

Instantly share code, notes, and snippets.

View sergiotapia's full-sized avatar
💭
In my restless dreams, I see that town.

Yeyo sergiotapia

💭
In my restless dreams, I see that town.
View GitHub Profile
This is some text.
And *another* text.
public class Foo
{
public string Person { get; set; }
}
Toodles!
Pentastream::Application.routes.draw do
get "streams/index"
get "streams/updateall"
root :to => 'streams#index'
end
Host Name IP Address/URL Record Type
@ http://www.YOUR-DOMAIN.com URL Redirect
www heroku-app-name.herokuapp.com CNAME (alias)
@sergiotapia
sergiotapia / gist:5216735
Created March 21, 2013 21:05
Documentacion: Plugin - "Dialogue"
Nombre de Plugin: **dialogue**
URL: [https://moodle.org/plugins/view.php?plugin=mod_dialogue](https://moodle.org/plugins/view.php?plugin=mod_dialogue)
Documentacion de Plugin Oficial: [http://docs.moodle.org/dev/Dialogue_2.0_specificatino](http://docs.moodle.org/dev/Dialogue_2.0_specificatino)
===========================================================================================
#Base de Datos
@sergiotapia
sergiotapia / gist:5360855
Last active December 16, 2015 02:09
Tarea
int cantidadTotalDePanes = 20;
int panesPorCliente = 3;
while (cantidadTotalDePanes > 0) {
if (cantidadTotalDePanes > panesPorCliente) {
Console.WriteLine("Entrego a cliente " + panesPorCliente + " panes.");
cantidadTotalDePanes -= panesPorCliente;
} else {
// Ya no tiene suficientes panes.
}
rails _3.2.13_ new smitecamp
bundle install
rails g scaffold champion name:string title:string hp:integer release_date:date

rake db:migrate

source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 1.2'
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: postgresql
encoding: unicode
host: localhost
database: smitecamp_db
@sergiotapia
sergiotapia / images_dimensions.go
Last active November 16, 2024 05:40
Golang - Getting the dimensions of an image. jpg, jpeg, png
package main
import (
"fmt"
"image"
"os"
_ "image/jpeg"
_ "image/png"
)