Skip to content

Instantly share code, notes, and snippets.

View ignacioiglesias's full-sized avatar

ignacioiglesias ignacioiglesias

View GitHub Profile
@ignacioiglesias
ignacioiglesias / migrate.js
Created April 1, 2020 12:44
Takes an AB test and replaces Custom HTML for JavaScript.
function migrate(param, value) {
var css = document.createElement("style");
css.innerHTML = `
.dt-el[data-rm-data-rm-friendly-name^="REPLACEMENT"] .dt-el-frame {background-color: yellow !important; color: black !important;}
.dt-el[data-rm-data-rm-friendly-name^="REPLACEMENT"][data-rm-data-rm-selected="true"] .dt-el-frame { background-color: gold !important; }
`;
document.head.appendChild(css);
var nameAttr = "data-rm-friendly-name";
var doc = store.page.document;
var abtest = doc.querySelector(

## Foreword

One of the basic human requirements is the need to dwell, and one of the central human acts is the act of inhabiting, of connecting ourselves, however temporarily, with a place on the planet which belongs to use and to which we belong. This is not, especially in the tumultuous present, an easy (act as it attested by the uninhabitted and unhabitable no-places in cities everywhere), and it requires help: we need allies in inhabitation.

Fortunately, we have at hand many allies, if onle we call on them,; other upright objects, from towers to chimneys to columns, stand in for us in sympathetic imitation of our own upright stance. Flowers and gardends server as testimonials to our own care, and breezes loosely captured can connect us with the very edge of the infinite. But in the West our own most powerful ally is light. "The sun never knew how wonderful it was," the architect Louis Kahn said, "until it fell on the wall of a building." And for us the act of inhabitation is mostly performed in cahoots

The fate of a writer is strange. He begins his career by being a baroque writer,
pompously baroque, and after many years, he might attain if the stars are favorable,
not simplicity, which is nothing, but rather a modest and secret complexity.
—Jorge Luis Borges, “Prologue,” The Self and The Other (1964)
And yet, and yet… Denying temporal succession, denying the self,
denying the astronomical universe, are apparent desperations and
secret consolations. Our destiny is not frightful by being unreal;
it is frightful because it is irreversible and iron-clad. Time is
the substance I am made of. Time is a river which sweeps me along,
but I am the river; it is a tiger which destroys me, but I am the tiger;
it is a fire which consumes me, but I am the fire.
The world, unfortunately, is real; I, unfortunately, am Borges.
— Borges - A New Refutation of Time (1946)
@ignacioiglesias
ignacioiglesias / joystick.js
Created December 10, 2012 23:34
PS3 joystick buttons
var buttons = {
buttons: {
1 : 'L2',
2 : 'R2',
4 : 'L1',
8 : 'R1',
16 : '▲',
32 : '●',
64 : '■',
128 : '×'
@ignacioiglesias
ignacioiglesias / subway.js
Created October 2, 2012 22:53
Shrink text until it fits
// It's using Mootools to get/set the font-size. You shouldn't
// really need that, I'll change it later.
function shrink() {
var wrapper = $('wrapper'),
text = $('text'),
minimumFontSize = 11,
fontSize;
while(text.offsetWidth > wrapper.offsetWidth) {
var addScore = function(r) { return r.score = Math.random(), r }
@ignacioiglesias
ignacioiglesias / 1.1.hs
Created September 17, 2012 16:24
Find the last element of a list
module Main where
myLength :: [x] -> Int
myLength x =
foldr (\x y -> y + 1) 0 x
myLast :: [x] -> x
myLast x =
x !! ((myLength x) - 1)
main =
module Main where
fizz :: Integer -> String
fizz x
| x `mod` 15 == 0 = "FizzBuzz"
| x `mod` 5 == 0 = "Buzz"
| x `mod` 3 == 0 = "Fizz"
| otherwise = show x
main =
print (map fizz [1..100])
FreeMarker template error!
Error on line 1, column 1 in DEVELOPMENT/configuration_files/ftl/pageComponents/header.ftl
siteHelper.site.navigationHeader is undefined.
It cannot be assigned to global
The problematic instruction:
----------
==> assignment: global=siteHelper.site.navigationHeader [on line 1, column 1 in DEVELOPMENT/configuration_files/ftl/pageComponents/header.ftl]
in include "../pageComponents/header.ftl" [on line 121, column 25 in DEVELOPMENT/configuration_files/ftl/decorators/nes.ftd]