This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=/usr/local/bin:/usr/bin:/bin | |
# cd to the directory of the image so we can work with just filenames | |
dir="$(dirname "$1")" | |
cd "$dir" || exit 1 | |
base="$(basename "$1" .jpg)" | |
# create a WebP version of the PNG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import { Raw, Editor } from 'slate' | |
const initialState = { | |
nodes: [ | |
{ | |
kind: "block", | |
type: "paragraph", | |
nodes: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Join together lists that don't have | |
// any blocks in-between | |
{ | |
match: (node) => { | |
return node.kind == 'document' | |
}, | |
validate: (document) => { | |
const joinableNode = document.nodes.find((node, key) => { | |
if (!['ordered-list', 'unordered-list'].includes(node.type)) { return false } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
match: (node) => { | |
return node.kind == 'document' | |
}, | |
validate: (document) => { | |
let previousNodeType = null | |
const joinableNode = document.nodes.find((node, key) => { | |
if (node.type === 'ordered-list' || node.type === 'unordered-list') { | |
console.log(node.type) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ massager git:(master) rspec spec | |
Massager | |
has a version number | |
Regular attributes | |
does not conflict with two classes with same attributes | |
works without type conversions | |
works with type checking | |
does the typechecking after the block has been executed | |
supports multiple attributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WebSocket connection to 'ws://vlablabla.elb.amazonaws.com/socket/websocket?token=abc&vsn=1.0.0' failed: Error during WebSocket handshake: Unexpected response code: 400 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) SERVICE - AccountManager #createOrFindUser sad path should fail because of inviting himself: | |
AssertionError: expected {} to deeply equal { Object (email) } | |
+ expected - actual | |
-{} | |
+{ | |
+ "email": "You are trying to invite yourself." | |
+} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chain.call( | |
[ | |
function(chain){ | |
// this gets called | |
chain.continue(); | |
}, | |
function(chain){ | |
// this gets called | |
chain.stop(); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe Notifier do | |
it "sends a message to a gateway" do | |
gateway = instance_double(Gateway) | |
expect(gateway).to receive(:call) | |
input = "My random input again" | |
Notifier.new(input: input, gateway: gateway) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input = "SOME INPUT FORM WHATEVER" | |
Notifier.new(input: input).call |
NewerOlder