Skip to content

Instantly share code, notes, and snippets.

View FerPerales's full-sized avatar
🎯
Focusing

Fernando Perales FerPerales

🎯
Focusing
View GitHub Profile
@FerPerales
FerPerales / .vimrc
Last active February 28, 2018 01:15
" Set max chars in column
set colorcolumn=110
" Colorize extra whitespaces at the end of a line
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
" Auto delete whitespaces on save
@FerPerales
FerPerales / setup.md
Last active August 1, 2017 02:25 — forked from chris-jamieson/setup.md
Set up Franz for Ubuntu
  • Download Franz for your distribution from MeetFranz.com
  • sudo mkdir /opt/franz
  • change into the same directory as the downloaded file, then sudo tar -xf Franz-linux-x64-4.9.4.tgz -C /opt/franz
  • sudo touch /usr/share/applications/franz.desktop then sudo vim /usr/share/applications/franz.desktop

paste the following lines into the file, then save the file:

[Desktop Entry]
Name=Franz
Comment=
http://es.railsbridge.org/docs/
@FerPerales
FerPerales / pre-commit.sh
Last active October 27, 2016 14:27
A git hook to help you avoid adding to you commit information you don't want (i.e. debugging statement)
# This script verifies if a list of "undesired" words are presented in the files you are intented to commit such console
# output, debugging information or keys/tokens/passwords
# Based on the git hook created by Mark Story
# http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes
# Instructions:
# Put this file into your .git/hooks folder and remove the .sh extension

Last week, I attended Fórum Internacional Software Libre hosted in the city of Porto Alegre, Brazil. During four days, I had the change to meet people from all the free software communities in Brazil as well as some members from communities in Latin America. The last day I gave a talk called "Introducing new generations to Free Software", which presents our journey and learnings from the Rails Girls Summer of Code 2015 and our efforts to encourage underrepresented groups in the IT industry to start a career in the professional software development industry with iniciatives such Railsbridge, RGSoC and Outreachy among others.

Some numbers:

3937 participants

492 speakers

519 hours in activities

@FerPerales
FerPerales / gist:443530189c0d7bb0171698b7725995a9
Last active July 21, 2016 21:21
ActiveResource vs. ActiveRecord
Al contrario: la sintaxis es similar:
En ActiveRecord, Person.find(1) buscara en la base de datos local una tabla llamada `people` y buscará el registro con el
id 1, traerá la informacion y la podras utilizar mediante un objeto de Ruby
En ActiveResource, Person.find(1) hará una llamada HTTP a la API que le hallas configurado en `self.site` infiriendo la ruta
a la que debe llamar siguiendo la arquitectura REST. Si tu `self.site` es, por ejemplo, http://api.demosite.com,
ActiveResource hará una petición GET a la ruta http://api.demosite.com/people/1, traerá la informacion y la podras utilizar
mediante un objeto de Ruby

ferperales.net

/about_me

/skills

@FerPerales
FerPerales / ml-ruby.md
Created May 9, 2016 15:32 — forked from gbuesing/ml-ruby.md
Resources for Machine Learning in Ruby

Resources for Machine Learning in Ruby

Gems

@FerPerales
FerPerales / parser.rb
Created December 18, 2013 23:32
Parser for zipcodes
file = File.open 'zip_codes.csv', 'r'
content = file.read
lines = content.split '>"'
output = ''
lines.each do |l|
begin
values = l.split ',"'
coordinates = values[1].
delete!("<Polygon><outerBoundaryIs><LinearRing><coordinates>").
@FerPerales
FerPerales / pre-push.sh
Last active December 18, 2015 11:19
pre-push
#!/bin/sh
# This pre-push hook will run 'rake' command to check if your test
# suite passes by looking for ', 0 failures' in the 'rake' output
# If found, will return exit and the git push command will continue
# Make sure you remove the .sh extension and put the hook into your
# .git/hooks directory in your project
# --------------------------------------------------------------------