Skip to content

Instantly share code, notes, and snippets.

View Charlyzzz's full-sized avatar
☁️
Cloud Sherpa

Erwin Carlos Debusschere Luoni Charlyzzz

☁️
Cloud Sherpa
View GitHub Profile
@Charlyzzz
Charlyzzz / gist:92ef1277f520c827839e
Last active September 20, 2015 21:15
angularjs
///////services.js/////////
app.service('twitterService', function($http) {
var self = this;
this.findAll = function() {
return $http.get('/Alltweets') });
};
});
// Tengo que asignarle los valores a los atributos del builder, y cuando digo
// ejecutar o contruir o build me devuelve una instancia con los valores que le puse
val builderDePerros = new PerroBuilder
builderDePerros.raza = "Perro Trompeta"
builderDePerros.edad = 2
val nuevoPerro = builderDePerros.build
@Charlyzzz
Charlyzzz / winstonDemo.js
Created February 3, 2016 19:44
Winston
/**
* Created by erwincdl on 03/02/16.
*/
var winston = require('winston');
var getTimestamp = () => {
return Date.now();
};
var logger = new winston.Logger({
module Validations
@catch_next_method = false
def validate(*validations)
@validations = validations
@catch_next_method = true
end
def method_added(method_name)
@Charlyzzz
Charlyzzz / dave.hs
Created May 6, 2016 04:35
Corrección Rocío TP individual
import Data.Char
instance Show (a -> b) where
show _ = "<function>"
data Barbaro = Barbaro {nombre :: String,fuerza :: Int, habilidades :: [String], objetos :: [Barbaro -> Barbaro]} deriving (Show)
type TransformacionBarbaro = Barbaro -> Barbaro
{-
Objeto? :p Mantené los nombres del dominio
-}
@Charlyzzz
Charlyzzz / dave.hs
Last active May 6, 2016 05:11
Corrección de Matías
import Text.Show.Functions
import Data.Char (toLower, toUpper)
import Data.List
data Barbaro = Barbaro {nombre::String, fuerza::Int, habilidades::[String], objetos::[Objeto]} deriving (Show)
type Objeto = Barbaro -> Barbaro
type Aventura = Barbaro -> Bool
-- ejemplos de barbaro
@Charlyzzz
Charlyzzz / dave.hs
Created May 6, 2016 05:23
Correción de Gonzalo
import Data.Char
instance Show (a -> b) where
show a= "<function>"
{-
import Text.Show.Functions
-}
@Charlyzzz
Charlyzzz / ratones.hs
Last active May 7, 2016 02:40
Corrección de Marina
-- TP Funcional PdeP "Ratones Paranoicos"
-- Marina Wang
import Data.Char
instance Show (a -> b) where
show a= "<function>"
{-
o import Text.Show.Functions
-}
@Charlyzzz
Charlyzzz / ratones.hs
Created May 7, 2016 04:43
Correción de Fede
import Data.List
import Text.Show.Functions
--A
isAlfa x = elem x ['a'..'Z']
isUpper x = elem x ['A'..'Z']
isDigit x = elem x ['0'..'9']
diccionario = ["aaron", "abaco", "abecedario", "baliente", "beligerante"]
empiezaCon :: String -> String -> Bool
@Charlyzzz
Charlyzzz / ratones.hs
Created May 7, 2016 05:06
Corrección de Eric
import Data.Char
instance Show (a -> b) where
show a= "<function>"
diccionario = ["aaron", "abaco", "abecedario", "baliente", "beligerante"]
type Usuario = (String, String)
type Aplicacion = ([Usuario], [(String->Bool)], (String -> String))
bancoNacion = ([("juan","sdsdiulwd"), ("robby","sxwrhotxhlhh")], [tieneAlMenosUnNumero,tieneXMayusculas 0], textoCesar 5)
empiezaConLetra :: String -> String -> Bool