-
Log in to REPL
-
Look at the following code:
# my_building is a representation of the apartments on each floor of my 3 story building
my_building = [
['apt1a', 'apt1b', 'apt1c'], | function createUUID() { | |
| var dt = new Date().getTime(); | |
| var uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { | |
| var r = (dt + Math.random() * 16) % 16 | 0; | |
| dt = Math.floor(dt / 16); | |
| return (c === "x" ? r : (r & 0x3) | 0x8).toString(16); | |
| }); | |
| return uuid; | |
| } |
| // goal is to be able to extend the notification payload type depending on the server implementation | |
| // library | |
| interface PushNotification { | |
| // ... | |
| } | |
| interface PushNotificationOptions<T> { | |
| // ... | |
| onNotification?: (notification: PushNotification & T) => void; |
| const az = { | |
| a: (![] + [])[+!![]], | |
| d: ([][[]] + [])[+!![] + !![]], | |
| e: (![] + [])[+!![] + !![] + !![] + !![]], | |
| f: (![] + [])[+[]], | |
| i: ([][[]] + [])[+!![] + !![] + !![] + !![] + !![]], | |
| l: (![] + [])[+!![] + !![]], | |
| n: ([][[]] + [])[+!![]], | |
| r: (!![] + [])[+!![]], | |
| s: (![] + [])[+!![] + !![] + !![]], |
| import { css, cx } from 'emotion'; | |
| import React, { useEffect, useState } from 'react'; | |
| export default function useTypewriter( | |
| text, | |
| { speed = 40, Component = 'p', startingIndex = -30 } = {}, | |
| ) { | |
| // start negative to create a delayed effect to offset the initial transition of the slide | |
| const [charIndex, setCharIndex] = useState(startingIndex); |
| # page 2 | |
| =begin | |
| Station>>computePart: aPart | |
| ^self multiplyPartTimesRate: aPart | |
| Station>>multiplyPartTimesRate: aPart | |
| ^Part | |
| amount: aPart amount * self rate | |
| date: aPart date | |
| =end |
| #!/usr/bin/env ruby | |
| def pbcopy(s) | |
| IO.popen("pbcopy", "w") { |f| f << s } | |
| end | |
| def translate(x_offset, y_offset, raw_xys) | |
| raw_xys | |
| .strip | |
| .split("\n") |