This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Enigma do | |
defmacro is_alpha(char) do | |
quote do: (unquote(char) >= 65 and unquote(char) <= 90) or (unquote(char) >= 97 and unquote(char) <= 122) | |
end | |
def break_code([head | tail], offset) when is_alpha(head) do | |
[head + offset | break_code(tail, offset)] | |
end | |
def break_code([head | tail], offset) do | |
[head | break_code(tail, offset)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="test"> | |
Hola, mundo! | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="outer-container"> | |
<div class="inner-container"> | |
<article>Lorem ipsum dolor sit amet, consectetur adipiscing elit</article> | |
<article>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</article> | |
<article>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="spaceinvader"> | |
<div class="pixel pixel1"> </div> | |
<div class="pixel pixel2"> </div> | |
<div class="pixel pixel3"> </div> | |
<div class="pixel pixel4"> </div> | |
<div class="pixel pixel5-11"> </div> | |
<div class="pixel pixel12-13"> </div> | |
<div class="pixel pixel14-16"> </div> | |
<div class="pixel pixel17-18"> </div> | |
<div class="pixel pixel19-29"> </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="sidebar"><h2>Sidebar</h2></div> | |
<div class="main"> | |
<h2>Main</h2> | |
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> | |
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> | |
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p> | |
</div> | |
<div class="footer"><h2>Footer</h2></div> | |
<div class="header"><h2>He |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Noticias</title> | |
</head> | |
<body> | |
<h1>Últimas noticias del día</h1> | |
<h2>Gaza: en medio de la tregua, | |
celebraron un casamiento en una | |
escuela de la ONU</h2> | |
<p>La pareja tenía previsto <a href= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git status | grep 'both modified' | awk '{print $4}' | vim -p `tr '\n' ' '` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { window.onclick = function(e) { window.scroll(0, e.pageY - 20) } })() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// one-liner to build a sequence of numbers | |
// source: http://ariya.ofilabs.com/2013/01/es6-and-array-comprehension.html | |
Array.apply(0, Array(3)).map(function(x, y) { return y }); // [0, 1, 2] | |
// one-liner to filter elements | |
// source: http://ariya.ofilabs.com/2013/01/es6-and-array-comprehension.html | |
[1,4,2,3,-8].filter(function(i) { return i < 3 }); // [1, 2, -8] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(typeof module != "undefined") | |
var scenario = require("../lib/gerbil.js").scenario; | |
scenario("Gerbil - Assertions", { | |
"should be able to assert": function(g) { | |
g.assert(true, true); | |
g.assert(true); // g.assert(x, x) is equivalent to g.assert(x) | |
g.assert(1 == 1); | |
g.assert(true != false); | |
}, |
NewerOlder