Warning
This is a warning!
Note
This is a note!
- WARNING
This is a warning
- WARNING
This is a warning
# This isn't meant to be ran as a script, but line-by-line | |
# Props to Binary (benary.org) for helping me with this | |
# Amended for ubuntu 18 | |
# 0: Create a Scaleway instance and SSH into it | |
ssh root@... | |
# 0: Install sudo | |
apt install sudo |
const initialState = () => ({ | |
dragging: false, | |
moveAction: null, | |
moveData: null, | |
releaseAction: null, | |
releaseData: null, | |
offsetX: 0, | |
offsetY: 0, | |
parentOffsetX: 0, |
// Note: Child model is NOT registered with choo.model() | |
const model = { | |
state: { | |
name: '', | |
x: 0, | |
y: 0, | |
width: 0, | |
height: 0, | |
}, |
import { run } from '@cycle/xstream-run'; | |
import xs, { Stream } from 'xstream'; | |
import { DOMSource } from "@cycle/dom/xstream-typings"; | |
import { makeDOMDriver, div, input, p, VNode } from '@cycle/dom'; | |
import Sidebar from './components/sidebar'; | |
export class UIState { | |
public selectedTool: string; |
import xs from 'xstream'; | |
import {run} from '@cycle/xstream-run'; | |
import {makeDOMDriver, h1} from '@cycle/dom'; | |
function main(sources: any) { | |
const sinks = { | |
DOM: xs.periodic(1000).map(i => | |
h1('' + i + ' seconds elapsed')) | |
}; |
(font-lock-add-keywords 'python-mode | |
'(("^\s*\\(def\s*\\)\\(.*\\)\\((.*):.*\xa\\)" | |
(1 '(:inherit 'font-lock-keyword-face :background "#F3F3F3")) | |
(2 '(:inherit 'font-lock-function-name-face :background "#F3F3F3" :weight bold)) | |
(3 '(:background "#F3F3F3")) | |
) | |
("^\s*\\(class\s*\\)\\(.*\\)\\((.*):.*\xa\\)" | |
(1 '(:inherit 'font-lock-keyword-face :background "#EEEEEE" :height 1.4)) | |
(2 '(:inherit 'font-lock-function-name-face :background "#EEEEEE" :height 1.4 :weight bold)) | |
(3 '(:background "#EEEEEE" :height 1.4)) |
_callbacks = {} | |
class Event(): | |
@staticmethod | |
def on(event_name, f): | |
_callbacks[event_name] = _callbacks.get(event_name, []) + [f] | |
return f |
Note: This just aligns the position of the textblock, not the text itself. |