Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
# | |
# ElasticSearch Dockerfile | |
# | |
# https://github.com/dockerfile/elasticsearch | |
# | |
# Pull base image. | |
FROM dockerfile/java | |
# Install ElasticSearch. |
Copy and paste the swift code below into a playground to experiment.
This is a very close emulation of Functor and Monad typeclasses in swift. However, it is very fragile (i.e. easy to crash the compiler).
For example, instance methods of fmap
will run fine, but attempting to use a globally defined fmap
that acts on Functor
types will cause a crash. Similarly for bind
. Unfortunately this means we cannot define the nice infix operator versions of these functions.
gem 'activerecord', '4.0' | |
gem 'sqlite3' |
input = "[{id: 'lookingAtFoo0', inResponseTo: 'looking at foo', onFinish: 'delete foo'}, {name: 'looking at foo', inResponseTo: 'found foo', onFinish: 'clikced foo'}]" | |
nodes = {} | |
class Node | |
def initialize(thisId) | |
self.id = thisId | |
end |
suits = %w| ⚫️ ⚪️ 🔴 🔵|.reverse | |
suits = %w|♦️ ️♣ ️♥️ ♠️|.reverse | |
nums = ["A"] + (2..9).to_a + %w|* J Q K| | |
cards = suits.map {|s| nums.collect {|i| "%s %s " % [i, s]}.reverse}.flatten | |
# cards = (1..52).map {|i| "%02d " % i} | |
puts cards.length | |
puts cards.join("|") |
irb | |
[14:20:42] kastner:kickstarter git:(master) $ irb | |
~/Development/ksr/kickstarter (main) > a = %w|a b c| | |
=> [ | |
[0] "a", | |
[1] "b", | |
[2] "c" | |
] | |
~/Development/ksr/kickstarter (main) > b = a | |
=> [ |
<canvas id="canvas" width="500" height="500"></canvas> |
five = require("johnny-five"); | |
board = new five.Board({ debug: false}); | |
board.on("ready", function() { | |
var servo1 = five.Servo({pin: 9}); | |
var servo2 = five.Servo({pin: 10}); | |
var servo3 = five.Servo({pin: 11}); | |
board.repl.inject({ | |
servo1: servo1, s1: servo1, |
DELTA_DIAGONAL_ROD = 288.5 | |
// Horizontal offset from middle of printer to smooth rod center. | |
DELTA_SMOOTH_ROD_OFFSET = 206.0 // mm | |
// Horizontal offset of the universal joints on the end effector. | |
// DELTA_EFFECTOR_OFFSET = 32.0 // mm | |
DELTA_EFFECTOR_OFFSET = 32.0 // mm | |
// Horizontal offset of the universal joints on the carriages. |