Skip to content

Instantly share code, notes, and snippets.

@prabhasp
Forked from anonymous/index.html
Created March 26, 2015 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prabhasp/b406f1fe2a32bcf27b3a to your computer and use it in GitHub Desktop.
Save prabhasp/b406f1fe2a32bcf27b3a to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Foo</title>
<meta charset='utf-8' />
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' />
<style type='text/css'>
body {
background:#000;
color:#fff;
font-family:'Georgia';
margin:0;
}
@-webkit-keyframes blinker {
from { opacity: 1.0; }
to { opacity: 0.0; }
}
em {
-webkit-animation-name: blinker;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
-webkit-animation-duration: 800ms;
}
strong {
font-weight:normal;
color:#FFF707;
}
a {
color:#FFF707;
text-decoration:none;
}
div {
cursor:pointer;
cursor:hand;
position:absolute;
top:0;
left:0;
}
</style>
<script type='text/javascript'>
window.onload = function() {
var s = document.getElementsByTagName('div'), cur = 0, ti;
if (!s) return;
function go(n) {
cur = n;
var i = 1e3, e = s[n], t;
document.body.className = e.dataset.bodyclass || '';
for (var k = 0; k < s.length; k++) s[k].style.display = 'none';
e.style.display = 'inline';
e.style.fontSize = i + 'px';
if (e.firstChild && e.firstChild.nodeName === 'IMG') {
document.body.style.backgroundImage = 'url(' + e.firstChild.src + ')';
e.firstChild.style.display = 'none';
if ('classList' in e) e.classList.add('imageText');
} else {
document.body.style.backgroundImage = '';
document.body.style.backgroundColor = e.style.backgroundColor;
}
if (ti !== undefined) window.clearInterval(ti);
t = parseInt(e.dataset.timeToNext || 0, 10);
if (t > 0) ti = window.setTimeout(fwd, (t * 1000));
while (
e.offsetWidth > window.innerWidth ||
e.offsetHeight > window.innerHeight) {
e.style.fontSize = (i -= 2) + 'px';
if (i < 0) break;
}
e.style.marginTop = ((window.innerHeight - e.offsetHeight) / 2) + 'px';
if (window.location.hash !== n) window.location.hash = n;
document.title = e.textContent || e.innerText;
}
document.onclick = function() { go(++cur % (s.length)); };
function fwd() { go(Math.min(s.length - 1, ++cur)); }
function rev() { go(Math.max(0, --cur)); }
document.onkeydown = function(e) {
if (e.which === 39 || e.which === 34 || e.which === 40) fwd();
if (e.which === 37 || e.which === 33 || e.which === 38) rev();
};
document.ontouchstart = function(e) {
var x0 = e.changedTouches[0].pageX;
document.ontouchend = function(e) {
var x1 = e.changedTouches[0].pageX;
if (x1 - x0 < 0) fwd();
if (x1 - x0 > 0) rev();
};
};
function parse_hash() {
return Math.max(Math.min(
s.length - 1,
parseInt(window.location.hash.substring(1), 10)), 0);
}
if (window.location.hash) cur = parse_hash() || cur;
window.onhashchange = function() {
var c = parse_hash();
if (c !== cur) go(c);
};
go(cur);
};
</script></head><body>
<div><h2 id="om-ninja">om ninja</h2>
</div>
<div><h4 id="prabhas-pokharel">prabhas pokharel</h4>
<h4 id="nirab-pudasaini">nirab pudasaini</h4>
</div>
<div><p>why did you come?</p>
</div>
<div><p>what will we make?</p>
</div>
<div><p>questions??
<img src="https://i.chzbgr.com/maxW500/6735287808/h09CE3973/" alt=""></p>
</div>
<div><p>&quot;you cannot teach programming, you can only facilitate someone&#39;s learning&quot;</p>
</div>
<div><p>clojurescript</p>
<ul>
<li>what was confusing?</li>
<li>surprising?</li>
<li>delighting?</li>
</ul>
</div>
<div><p>setup</p>
</div>
<div><p>functional programming</p>
</div>
<div><p>everything returns something:</p>
<ul>
<li>let</li>
<li>do</li>
<li>functions</li>
<li>fn / defn / #(..)</li>
</ul>
</div>
<div><p>functions #9:</p>
<ul>
<li><code>(= 25 (___ (fn [n] (* n n))))</code></li>
</ul>
</div>
<div><p>palindromes:</p>
<ul>
<li>1, 11, 12321</li>
<li>MALAYALAM</li>
<li>मलम, रमेर(?)</li>
</ul>
</div>
<div><p><code>(defn is_palindrome [i] ...)</code></p>
</div>
<div><p>filter</p>
</div>
<div><p>map</p>
</div>
<div><p>om</p>
</div>

om ninja


prabhas pokharel

nirab pudasaini


why did you come?


what will we make?


OMG REACT NATIVE!!


questions??


"you cannot teach programming, you can only facilitate someone's learning"


clojurescript

  • what was confusing?
  • surprising?
  • delighting?

setup


functional programming


everything returns something:

  • let
  • do
  • functions
  • fn / defn / #(..)

functions #9:

  • (= 25 (___ (fn [n] (* n n))))

palindromes:

  • 1, 11, 12321
  • MALAYALAM
  • मलम, रमेर(?)

(defn is_palindrome [i] ...)


filter


map


om

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment