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
-- Explicitly stating the order of computation `a (b c)` makes this not compile | |
-- While, if we used a C style, order of computation would be explicit by default `a(b(c))` vs `a(b, c)` | |
example1 = a b c | |
where | |
a first second = first ++ second | |
b = "hey" | |
c = " world" | |
-- Explicitly stating `a (b c)` makes this compile | |
example2 = a b c |
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
Arduino | |
1. $65.94 -- Buy Ardunio Yun -- http://www.amazon.com/Arduino-A000008-Y%C3%9AN/dp/B00F6YJK3S | |
2. $8.95 -- Buy LCD Shield -- http://www.amazon.com/ZITRADES-Keypad-Display-Arduino-Duemilanove/dp/B00BOMPW60 | |
3. $6.97 -- Buy Jumper Cables -- http://www.amazon.com/RioRand-Dupont-Male-Male-Female-Female-Female-Male/dp/B00J5NSOVA | |
3. Program ticker software | |
4. ??? | |
5. Profit! | |
Total $81.86 |
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> | |
<script> | |
setInterval(function () { | |
var elements = document.querySelectorAll('.blink'); // I'm pulling every element from the DOM with class "blink" | |
for (var i = 0; i < elements.length; i += 1) { // iterate through all the elements | |
var element = elements[i]; | |
if (!element.style.visibility) { // if no visibility is set, it means it's displayed | |
element.style.visibility = 'hidden'; // so lets hide it |
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
a = 5 | |
b = 3 | |
c = a + b = 15 | |
a a a a a | |
b c c c c c | |
b c c c c c | |
b c c c c c | |
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
number_of_atoms = 10e80 -- quantity | |
size_of_universe = 46e9 * 3.15569e7 -- light years to seconds | |
smallest_distance = 5.3910632e-44 -- seconds | |
speed_of_light = 299792458 | |
bits_in_universe = ( | |
{- x -} log(size_of_universe / smallest_distance) / log(2) | |
{- y -} + log(size_of_universe / smallest_distance) / log(2) |
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
sudo ln -s /usr/bin/docker /usr/bin/donger |
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 ng-bind="window_title"></title> | |
</head> | |
</body> |
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
use std::fmt; | |
#[deriving(Clone)] | |
enum MyInteger { | |
Zero(Box<MyInteger>), | |
One(Box<MyInteger>), | |
End | |
} | |
/** |
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
data MyInteger = Zero MyInteger | One MyInteger | End | |
-- | Show integer | |
-- >>> show (One $ One $ Zero $ Zero $ Zero $ End) | |
-- "11000b" | |
-- >>> show (End) | |
-- "b" | |
instance Show MyInteger where | |
show (Zero rest) = "0" ++ show rest | |
show (One rest) = "1" ++ show rest |
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
fetchDependencies: (version, value) -> | |
promises = [] | |
for x in version.dependencies | |
promise = @searchTerm(x.name).then (data) => | |
d = _.first(data) | |
dep_search = _.last(d.versions) | |
if dep_search.scripts.length > 0 | |
el = document.createElement("script") | |
el.setAttribute("data-require", value.name + "@*") | |
el.setAttribute("data-semver", version.semver) |