Skip to content

Instantly share code, notes, and snippets.

View eloyesp's full-sized avatar

Eloy Espinaco eloyesp

View GitHub Profile
es-AR:
errors:
messages:
not_found: 'no encontrado'
already_confirmed: 'ya ha sido confirmada'
not_locked: 'no está bloqueada'
devise:
failure:
unauthenticated: 'Necesitas acceder a tu cuenta o registrarte antes de continuar.'
@eloyesp
eloyesp / assets.rake
Created March 5, 2012 10:39 — forked from thermistor/assets.rake
Check asset encoding for valid UTF-8 and autoconvert from ISO-8859-15
def assets_with_encoding_problems
results = {}
paths = ["app/assets", "lib/assets", "vendor/assets"]
paths.each do |path|
Dir[Rails.root + path + "**" + "*.{js,css}"].each do |file|
# make sure we're not trying to process a directory
raise "directory bad named: #{file} " if File.directory?(file)
# read the file and check its encoding
data = File.read(file)
results[file] = data unless data.valid_encoding?
@eloyesp
eloyesp / ejercicio_35.c
Created March 22, 2012 16:43
Ejercicios C
#include <stdio.h>
#include <math.h>
int main()
{
float radio, perimetro, area;
printf("Ingrese el radio: ");
scanf("%f", &radio);
@eloyesp
eloyesp / 2do_taller_1.c
Created April 12, 2012 18:25
2do Taller
# include <stdio.h>
# define MAX 10
int duplicado(int const vector[], int last);
int main(void) {
int i, vector[MAX];
for (i = 0; i < MAX; i++) {
@eloyesp
eloyesp / ejercicio5.py
Created April 19, 2012 00:55
ejercicio 5
# Este programa cambia el formato del tiempo
print "Inicio del tiempo: 00:00:00 del 01/01/2012"
segundos_trans = int(raw_input("Segundos transcurridos: "))
minutos_trans = segundos_trans / 60
segs = segundos_trans % 60
horas_trans = minutos_trans / 60
mins = minutos_trans % 60
@eloyesp
eloyesp / Gemfile.lock
Created May 23, 2012 17:40
Gemfile.lock working for active_admin
PATH
remote: .
specs:
activeadmin (0.4.4)
bourbon (>= 1.0.0)
devise (>= 1.1.2)
fastercsv
formtastic (~> 2.1.1)
inherited_resources (>= 1.3.1)
jquery-rails (>= 1.0.0)
@eloyesp
eloyesp / error.log
Created May 23, 2012 17:43
error in active_admin rake task
› ruby -v && gem -v && rails -v && bundle install && bundle exec rake
ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
1.8.24
Rails 3.2.3
Fetching gem metadata from http://rubygems.org/........
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.5)
Using activesupport (3.2.0)
Using builder (3.0.0)
@eloyesp
eloyesp / how_to_go_from_pdf_to_markdown.sh
Created September 6, 2013 19:47
How to get a readable pdf.
pdftohtml objects-on-rails.pdf
firefox objects-on-rails.html
pandoc -o objects-on-rails.markdown objects-on-railss.html
gvim objects-on-rails.markdown
pandoc -o objects-on-rails.txt objects-on-railss.html
@eloyesp
eloyesp / archivo.md
Last active August 29, 2015 14:03 — forked from olvap/archivo.md

App de rails

rails new archivo cd archivo

scaffold

La instrucción scaffold, ejecuta la instrucción model y controller para hacer un CRUD de un recurso dado. Es como hacer rails g model y rails g controller.

rails g scaffold file_record title 

rails g scaffold office name

@eloyesp
eloyesp / archivo.md
Last active August 29, 2015 14:03 — forked from olvap/archivo.md

App de rails

rails new archivo
cd archivo

Scaffold

La instrucción scaffold, ejecuta la instrucción model y controller para hacer un CRUD de un recurso dado. Es como hacer rails g model y rails g controller.