Skip to content

Instantly share code, notes, and snippets.

View mayra-cabrera's full-sized avatar
💃
Nothing to do here. Go to https://gitlab.com/mayra-cabrera instead

Mayra Cabrera mayra-cabrera

💃
Nothing to do here. Go to https://gitlab.com/mayra-cabrera instead
View GitHub Profile
@mayra-cabrera
mayra-cabrera / gist:33b88ccaa383ebae1de9
Created January 27, 2015 17:56
Remove sensitive data from commits history

Imagine that you want to erase completely the file under config/secrets.yml from your commits history

Move to the working directory where the config folder is placed

cd dummy/

Run git filter-branch, forcing (--force) Git to process—but not check out (--index-filter)—the entire history of every branch and tag (--tag-name-filter cat -- --all), removing the specified file (git rm --cached --ignore-unmatch Rakefile) and any empty commits generated as a result (--prune-empty). Note that you need to specify the path to the file you want to remove, not just its filename. The previous was taken from Github documentation

git filter-branch --force --index-filter \

@mayra-cabrera
mayra-cabrera / management.md
Last active January 23, 2017 18:58
Mejorar la coordinación y administración de proyectos

Que los entregables del Design Sprint sean:

  • Resumen del proyecto
  • Prototipo
  • User stories (para poder bajarlo a nivel ingeniera)
@mayra-cabrera
mayra-cabrera / bing_google_maps.md
Last active January 12, 2017 18:06
Bing vs Google Maps Examples

Bing Example

Ventajas:

  • Permite hasta 100 íconos en el mapa

Desventajas:

  • No es posible agregar estilos a los mapas
  • No permite los íconos personalizados, tenemos que elegir entre los que Bing sugiere (https://msdn.microsoft.com/en-us/library/ff701719.aspx), en este caso se eligió el 57 por ser el más parecido a nuestro diseño.
  • No es una tecnología familiar
@mayra-cabrera
mayra-cabrera / coordinate_formats.md
Created September 20, 2016 17:42
Coordinate formats

Valid formats for a coordinate point

# Latitude example 
N43°38'19.39"
N43°38'19.39'
N43°38"19.39"
N43°38"19.39"
43°38'19.39"N
43°38'19.39'N
@mayra-cabrera
mayra-cabrera / comandos.md
Last active August 31, 2016 17:40
Taller Software Ágil Comandos

### Pruebas Unitarias

Para entrar al container

$ docker-compose run ruby bash

Instalar rspec dentro del container

@mayra-cabrera
mayra-cabrera / distance_in_words.yml
Last active June 30, 2016 00:18
Distance in words spanish
date:
abbr_day_names:
- dom
- lun
- mar
- mié
- jue
- vie
- sáb
abbr_month_names:
@mayra-cabrera
mayra-cabrera / es.yml
Created June 29, 2016 23:41
es & en basic examples
es:
author: "Autor"
books: "Libros"
code: "Código"
name: "Nombre"
sign_in: "Iniciar Sesión"
VAL = 'Global'
 
module Foo
  VAL = 'Foo Local'
 
  class Bar
    def value1
      VAL
 end

Suponiendo la siguiente información en una base de datos:

Employee

Id name organization_id
1 Kaitlin 1
2 Vidal 1
3 Eliza 2
@mayra-cabrera
mayra-cabrera / ruby_patterns.md
Last active February 23, 2016 15:58
Ruby patterns example

Null Object Pattern

Definir una clase que se comporte de las diferentes formas que esperas

class GeneralComment
  def self.find comment_id
    @comment = Comment.find(comment_id) || MissingComment.new
  end
end