Skip to content

Instantly share code, notes, and snippets.

@cdata
cdata / ast.json
Last active August 26, 2015 01:23
WIP stateless top-down CSS parser
[
{
"type": "comment",
"value": "/* An comment. */"
},
{
"type": "at-rule",
"identifier": "@import",
"value": " url('foo-external.css')"
},

Overlay Solution

  1. Dialogs and dropdowns (should) live in separate parts of the tree.
  2. Support "constrained" dropdowns that can be guaranteed to be on top of everything.
    • These dropdowns are constrained by how their DOM is generated, and how rules like scoping, events and other things apply.
  3. This can be layered on top of the existing overlay solution.

Action Items

  • (cdata) Explore position: fixed breaking out of overflow: hidden.
@cdata
cdata / gist:9117549
Last active August 29, 2015 13:56 — forked from getify/gist:9110935

Consistency is in the eye of the beholder..

// Hey, what gives here? This is weird and unexpected.
// Why is the promise factory called synchronously, when
// all the other steps resolve async? For consistency,
// one would expect them all to be async.

var p = new Promise(function(resolve,reject){
 console.log("what");
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0EHPp8oaCm1IqTw5uRxCSDCHgseONYBWD602BHksh+PQG25lvgFsF2rwd7qMyS7s4aQlywhL8nQjmUP+wrY2RcCAYGki97xuKA0VnFqKleE7nNeMGXDxOOuVX22MFJ0p50ZgrZ6UYp20V73EuYg/3IJUn4GC4yfhCMpqbBiK9cUFPR+EKoBAQ26oxgsXUettSaKtlcAdU6Vmt1Vk0nfdCpmVDxx7lGkLwq+hWk2SCWzckNqKK89ID+xahcMT+WkHYkXybTbp0KYZUUcKRRnjwhuWBEWr4XN2Qz+a4hn94cXS/ykABbRrUKImsk2ZOxDf78nTffdJvItn7Q5tumDx7 chris@scriptolo.gy
li {
display: block;
position: relative;
}
This file has been truncated, but you can view the full file.
! function (t) {
var e = window.Bugsnag;
window.Bugsnag = t(window, document, navigator, e)
}(function (t, e, n, r) {
function o(t, e) {
try {
if ("function" != typeof t) return t;
if (!t.bugsnag) {
var n = s();
t.bugsnag = function (r) {
{
events: {
'#subViewOne click': 'swapOutOne',
'#subViewTwo click': 'swapOutTwo'
},
initialize: function () {
this.subViewOne = new SubViewOne();
this.subViewTwo = new SubViewTwo();
this.someRegion.show(this.subViewOne);
http://www.planetminecraft.com/mod/zans-minimap/
http://www.mediafire.com/download/8tjjxvghv3jpv18/voxelmap-1.7.2-1.0.jar
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1277913-craftguide-v1-6-8-1
http://www.curse.com/mc-mods/minecraft/craftguide
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1289765-waila-1-5-2
http://www.curse.com/mc-mods/minecraft/waila/788512
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1279956-chickenbones-mods
@cdata
cdata / gist:3aa6593f255eee8b2497
Created July 24, 2014 01:24
Ruby's fetch for JavaScript
Object.defineProperty(Object.prototype, 'fetch', {
value: function(key, _default) {
if (key in this) {
return this[key];
}
if (arguments.length > 1) {
return _default;
}