Skip to content

Instantly share code, notes, and snippets.

@igoratron
igoratron / keybase.md
Created September 13, 2021 12:44
keybase.md

Keybase proof

I hereby claim:

  • I am igoratron on github.
  • I am igoratron (https://keybase.io/igoratron) on keybase.
  • I have a public key ASDH9gNRalk5xzC7QXhOkpTV85ATS2Hr4tDk_io9wkCVeAo

To claim this, I am signing this object:

@igoratron
igoratron / exercise.js
Created April 20, 2018 13:42
Change case kata
function changeCase(identifier, targetCase){
if(!isSupportedCase(targetCase)) {
return;
}
if(!isValid(identifier)) {
return;
}
const words = tokenise(identifier);
{
"exclude": [
".git/**",
"node_modules/**",
"bower_components/**"
],
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
@igoratron
igoratron / EnahanceConf-notes.md
Last active March 7, 2016 11:27
My notes from EnhanceConf 2016

Designing for a hostile environment

Nat Buckley

Video: https://www.youtube.com/watch?v=WU4vDTxLIdE

tl;dr: think about what you're building and who you're building it for

Browser is a very hostile environment to program against because lots of things are outside of our control, the network connection, the browser/runtime environment, screen size, etc...

What does it mean then when we say "a site doesn't work"? It means you can't complete a task, the reason why you came to the website in the first place. There are multiple reasons why that could be:

@igoratron
igoratron / gist:25aa72a0f992ca226f84
Created February 9, 2015 14:06
lazy underscore kata
var generators = {
range: function *rangeGenerator(start, end, step) {
for(var i = start; i < end; i += step) {
console.log('generating', i);
yield i;
}
},
take: function *takeGenerator(iter, n) {
for(var i = 0; i < n; i += 1) {
yield iter.next().value;
<!doctype html>
<html>
<head>
<title>Test case</title>
<style>
.test-case {
background-color: white;
border-radius: 20px;
width: 40px;
height: 40px;