Skip to content

Instantly share code, notes, and snippets.

View jessecogollo's full-sized avatar
💭
#IamLibertarian

Jesse cogollo jessecogollo

💭
#IamLibertarian
View GitHub Profile
@jessecogollo
jessecogollo / avakids.cpp
Created July 25, 2019 07:27
Codigo necesario para programar el arduino lilypad.
// Avakids by @avanet
/******************************************************************
--LilyPad Light Sensor Trigger - Automatic Night Light
--By KOOKYE
This example code reads the input from a LilyPad Light Sensor compares it to
a set threshold named 'dark'. If the light reading is below the threshold,
three LEDs will turn on and a tri-color led will change the color.
Light Sensor connections:
@jessecogollo
jessecogollo / starman.hs
Last active June 20, 2021 02:59
guessing game - 2.11 - learnfuture
import System.Random
check :: String -> String -> Char -> (Bool, String)
check word display c
= (c `elem` word, [if x == c
then c
else y | (x,y) <- zip word display])
turn :: String -> String -> Int -> IO ()
turn word display n =
@jessecogollo
jessecogollo / speller.hs
Created June 28, 2021 04:59
speller exersise
getLetter :: [Char] -> [Char]
getLetter word =
take 1 word
createSinglePhrase :: [Char] -> [Char]
createSinglePhrase word =
getLetter word ++ " is for " ++ word
createPhrase :: [Char] -> [[Char]] -> [Char]
createPhrase word lst =
@jessecogollo
jessecogollo / ahorcado.hs
Last active July 21, 2021 06:32
Ejercicio ahorcado en Haskell
-- import Data.Char
import System.Random
check :: String -> String -> Char -> (Bool, String)
check word display c
= (c `elem` word, [if x == c
then c
else y | (x,y) <- zip word display])
turn :: String -> String -> Int -> IO ()
@jessecogollo
jessecogollo / ahorcado.js
Last active July 21, 2021 06:32
Ejercicio ahorcado en JavaScript
const readline = require('readline')
const R = require('ramda')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
})
const question = (question) => {
return new Promise(function (resolve) {
@jessecogollo
jessecogollo / deletreador.hs
Created July 21, 2021 06:32
Ejercicio deletreador en Haskell
getLetter :: [Char] -> [Char]
getLetter word =
take 1 word
createSinglePhrase :: [Char] -> [Char]
createSinglePhrase word =
getLetter word ++ " is for " ++ word
createPhrase :: [Char] -> [[Char]] -> [Char]
createPhrase word lst =
@jessecogollo
jessecogollo / deletreador.js
Created July 21, 2021 06:35
Ejercicio deletreador en JavaScript
const getLetter = (word) => {
return word[0]
}
const createSinglePhrase = (word) => {
return `${getLetter(word)} is for ${word}`
}
const createPhrase = (word, lst) => {
return lst.length === 1 ?