Skip to content

Instantly share code, notes, and snippets.

View gatero's full-sized avatar
🙃
can I help you?

Daniel Ortega gatero

🙃
can I help you?
View GitHub Profile
@gatero
gatero / sed cheatsheet
Created July 31, 2018 13:14 — forked from ssstonebraker/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@gatero
gatero / mgoExample.go
Created March 15, 2018 07:09 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@gatero
gatero / reflection.go
Created March 15, 2018 06:30 — forked from drewolson/reflection.go
Golang Reflection Example
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
@gatero
gatero / introrx.md
Created March 16, 2016 21:09 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@gatero
gatero / gist:1413e1a9175c25318252
Created February 8, 2016 19:34 — forked from Fernan2/gist:3696586
Instalación de programas en un Mac recién estrenado

Instalación y configuración

  • Preferencias del sistema (Dock, Seguridad, Economizador, Ratón, Compartir...)

  • Navegadores

  • Firefox (Copy as HTML Link, Firebug, Font Finder, PageSpeed Insights, SearchStatus, Web Developer, YSlow, ¿FireSass, Google Translator?) + preferencias

  • Chrome ya importa extensiones y preferencias si te logueas (Alexa Traffic Rank, Capturador de Páginas Web, Create Link, Firebug Lite, Pendule, Power Twitter, Resolution Test, SEO Status)

  • Editores:

angular
.module 'inspiraApp'
.factory 'DateService', [->
startStatus: opened: no
endStatus: opened: no
setScope: (scope)-> @scope = scope
getToday: (model)->
@scope.startDate = @scope.endDate = new Date
window.RegularExpression =
number : /^[0-9]+$/
letters : /^[a-zA-Z_áéíóúñ\s]*$/
alphanumeric : /^[a-zA-Z0-9]+$/
latin_letters : /^[a-zA-ZáéíóúàèìòùÀÈÌÒÙÁÉÍÓÚñÑüÜ_\s]+$/
email : /^[a-zA-Z0-9\._-]+@[a-zA-Z0-9-]{2,}[.][a-zA-Z]{2,4}$/
password : /^([a-z]+[0-9]+)|([0-9]+[a-z]+)/i
url : /^(ht|f)tps?:\/\/\w+([\.\-\w]+)?\.([a-z]{2,6})?([\.\-\w\/_]+)$/i
localhost : /^http:\/\/(localhost|127\.0\.0\.1)/
zip_code : /^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$/
$default-test-color: #F00;
@mixin test($color: $default-test-color, $type: all) {
@if $type == all {
& ,
* {
outline: 1px solid $color;
}
} @else if $type == content {
* {
#global module:false
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
meta:
version: '0.1.0',
banner: '/*!\n * Sapphiriq - v<%= meta.version %> - ' +
@gatero
gatero / propuesta-documentacion.coffee
Last active August 29, 2015 14:22
Propuesta para documentación de funcionalidad
(($) ->
# WReservation class
###
Widget for reservation
@param generalContainer Selector String - General scope container
@dependencies jQuery, jQuery ui(Datepicker and autocomplete)
@styles .hidden class
###
class WReservation
constructor:(@generalContainer)->