Skip to content

Instantly share code, notes, and snippets.

View jdiez17's full-sized avatar

José Manuel Díez jdiez17

View GitHub Profile
module Week5 where
-- List of numbers, lower bound, upper bound
search :: [Int] -> Int -> Int -> Maybe Int
search [] _ _ = Nothing
search (x:xs) l u
| x > l && x < u = Just x
| otherwise = search xs l u
module Fizzbuzz where
import Data.List (unlines)
fizzbuzz :: Int -> String
fizzbuzz n = case (n `mod` 3, n `mod` 5) of
(0, 0) -> "FizzBuzz"
(0, _) -> "Fizz"
(_, 0) -> "Buzz"
(_, _) -> show n
module Week2 where
import Data.List (transpose)
import Control.Arrow
data Piece = King | Queen | Rook | Bishop | Knight | Pawn | Empty
deriving (Show)
data Board = Board Int Int [[Piece]]
instance Show Board where
[global]
font = "Ubuntu Mono 13"
allow_markup = yes
format = "<b>%s %p</b>\n%b"
sort = yes
indicate_hidden = true
# geometry = "x5"
transparency = 40
idle_threshold = 0
geometry = "300x5-20+20"
package agent
import (
"encoding/json"
"fmt"
)
type Event struct {
Agent string
Source string
Traceback (most recent call last):
File "compile_static.py", line 111, in <module>
prepare()
File "compile_static.py", line 54, in prepare
output = minify(output)
File "/home/jdiez/MediaCrush/lib/python2.7/site-packages/slimit/minifier.py", line 38, in minify
tree = parser.parse(text)
File "/home/jdiez/MediaCrush/lib/python2.7/site-packages/slimit/parser.py", line 93, in parse
return self.parser.parse(text, lexer=self.lexer, debug=debug)
File "/home/jdiez/MediaCrush/lib/python2.7/site-packages/ply/yacc.py", line 265, in parse
package main
import (
"bufio"
"fmt"
"net"
"os"
"sync"
"time"
"io"
josemanueldiez@personal:/tmp$ curl -I -r 0-99 https://cdn-us-1.mediacru.sh/XKqIoTA38VaO.webm
HTTP/1.1 206 Partial Content
Server: nginx/1.7.4
Date: Mon, 18 Aug 2014 23:54:01 GMT
Content-Type: video/webm
Content-Length: 100
Connection: keep-alive
Last-Modified: Tue, 01 Jul 2014 22:20:09 GMT
ETag: "53b33419-71f1ea"
Expires: Wed, 17 Sep 2014 23:54:01 GMT
jdiez@judiez:~$ grep -i gopath .bashrc
export GOPATH=$HOME/go
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCy5p92lfLeQhkD5Kcy89Y3/Dg7GEaDKdKZfkk+2GOq41bDw1KGfMb1Vzxq/wHODxDGkNW3kaD4C/KeLgfnAVlcrjqeN8U7qEa2SXRrdQ4By7cVaBRDqTK8zxl1G9/TZ+lFif1rXiuhesHquYMW17K7uCBPGF/sDhyP0v85XVVeVByidzZ7MUsT0ZQXf1yD000hKYU+ehrz9ZEoUfEPGCwJGvOWM/GAbQYL8mTiSlT2hEow87r1JZEYoMn2+OOHdCqGa+cofe1EQYVGgcmBLo4gY90yZu6g4Ush9IuJE5htT19eOw+AzG/yOGV40UHAOvEgTO9QN34ykJEuRaQ9OJSj jdiez@InfiniteImprobabilityDrive