Skip to content

Instantly share code, notes, and snippets.

W11: Warning: File "README.md" has changed since editing started
See ":help W11" for more info.

[O]K, (L)oad File: █

window.onclick = function () {
console.log('wut')
}
<!doctype html>
<body style='margin: 0; position: relative'>
<div style='height: 20px'>20px tall</div>
<script src='https://code.jquery.com/jquery-2.2.4.js'></script>
<script>
window.parent.postMessage({
id: 'autoshrink',
msg: '<code>$(\'html\').height()</code>: ' + $('html').height()
+ '; <code>$(document).height()</code>: ' + $(document).height()
+ '; <code>document.documentElement.scrollHeight: '
<!DOCTYPE html>
<html>
<head>
<style>
span {
background: orange;
}
.line2 {
margin-top: -1.8em;
              DOM events
                  ↓ (keydown, keypress, input, etc)
public API    saneKeyboardEvents
    ↓             ↓ (keystroke, typedText)
service (typing etc) + edit tree + cursor position + config
          ↓ (moveInto, selectOutOf, write, etc)
command (next to the cursor) + config
          ↓ (tree diff + new cursor position)
core (applies tree diff (which modifies displayed math), updates cursor position)
  • Review: for loops

    • Write a function foo(n) such that when you do foo(3), it prints out:

        1
        2
        3
      

      Each on its own line.

Subject: [PATCH] CI: Print exit code of bg processes
And complain if the readyfiles are anything but empty, including if the
exit code is written to them.
diff --git a/circle.yml b/circle.yml
index e910497..28f7e60 100644
--- a/circle.yml
+++ b/circle.yml
@@ -50,7 +50,7 @@ dependencies:
Subject: [PATCH] Print exit code of bg Sauce process
And complain if the readyfiles are anything but empty, including if the
exit code is written to them.
diff --git a/circle.yml b/circle.yml
index e910497..28f7e60 100644
--- a/circle.yml
+++ b/circle.yml
@@ -50,7 +50,7 @@ dependencies:
import random
import sys
def generate_board(width, height, number_of_mines, debug=False):
list_of_coords = [(x,y) for x in xrange(width) for y in xrange(height)]
list_of_mines = random.sample(list_of_coords, number_of_mines)
if debug: print 'mines:', list_of_mines
board = [[0] * height for _ in xrange(width)]
for x, y in list_of_mines: