Skip to content

Instantly share code, notes, and snippets.

(defn verifica [x y] (do (print x "==" y "? ") (assert (= x y)) (println "OK")))
(defn soma-dois-primeiros [frame] (reduce + (take 2 frame)))
(defn pontos-do-ultimo-frame [frame] (reduce + frame))
(defn segunda-jogada [jogo]
(if (and (= 10 (ffirst jogo)) (> (count jogo) 1))
(first (second jogo))
(second (first jogo))))
@luiz
luiz / CurrentSyntax.java
Created March 3, 2011 15:54
VRaptor HTML DSL's current syntax
html(
head(
title("Page generated by VRaptor's HTML DSL"),
css("/css/example.css"),
js("https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"),
js("/js/example.js")
),
body(
image("/images/vraptor-logo.png", "VRaptor Logo"),
p(
@luiz
luiz / countdown.sh
Created June 27, 2012 23:48
Countdown for bash
#!/bin/bash
# depends: figlet beep
# usage: countdown.sh <seconds>
COLUMNS=$(tput cols)
for i in `seq $1 -1 1`
do
clear
figlet -w $COLUMNS -c $i
@luiz
luiz / dabblet.css
Last active August 29, 2015 13:56
Aside nav test by srsaude
/* Aside nav test by srsaude */
.main-nav-link {
position: fixed;
top: 50%;
left: 100%;
transform: translate(-50%, -50%);
display: block;
width: 50px;
height: 50px;
overflow: hidden;
@luiz
luiz / dabblet.css
Created May 23, 2014 22:43
JRE 8 profiles graph
/* JRE 8 profiles graph */
.jvm-profile p {
height: 0;
color: white;
border-left: 3em solid transparent;
border-right: 3em solid transparent;
text-align: center;
margin: 1em auto;
}
.jvm-profile .compact1 {
@luiz
luiz / dabblet.css
Created June 18, 2014 17:31
Multiline boxes
/* Multiline boxes */
.exp {
width: 40ch;
margin: 1em;
background-color: #FFB;
}
.caixinha {
width: 10ch;
height: 2em;
background-color: #FF6;
@luiz
luiz / dabblet.css
Created June 18, 2014 20:33
flexbox use case
/* flexbox use case */
.products {
padding: 0;
margin: 0;
}
.product {
background-color: #FFC;
font-size: 60%;
list-style: none;
margin: 1em;
@luiz
luiz / dabblet.css
Created June 26, 2014 16:55
Untitled
body { overflow-y: scroll; }
.caixas {
background-color: #ffc;
margin: 0;
padding: 0;
}
.caixa {
list-style: none;
border: .4vw solid;
width: 20vw;
@luiz
luiz / dabblet.css
Created July 8, 2014 00:35 — forked from anonymous/dabblet.css
Untitled
.container {
border: 2px solid black;
text-align-last: justify;
margin: 0;
padding: 0;
}
.content {
width: 20%;
display: inline-block;
height: 100px;
@luiz
luiz / dabblet.css
Created August 11, 2014 20:24 — forked from anonymous/dabblet.css
Untitled
html,body {
height: 100%;
}
body:before {
content: '';
height: 100%;
display: inline-block;
vertical-align: middle;
}
meter {