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
defmodule PetalsDragNDropWeb.PageLive do | |
# ... | |
@impl true | |
def render(assigns) do | |
~F""" | |
... | |
<GridWithDragAndDrop | |
dragged="letter_dragged" |
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
<div | |
x-data="{dragging: false}" | |
:hook="GridWithDragAndDrop" | |
> | |
{#for %{x: x, y: y} = item <- @data} | |
<div | |
id={item[:id]} | |
draggable="true" | |
... | |
> |
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
defmodule PetalsDragNDropWeb.PageLive do | |
use PetalsDragNDropWeb, :live_view | |
data world, :string, default: "world!" | |
@impl true | |
def render(assigns) do | |
~F""" | |
<div | |
id="page" |
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
# Environment variables are escaped by the envsubst entrypoint | |
homeassistant: false | |
permit_join: $ZIGBEE2MQTT_PERMIT_JOIN | |
mqtt: | |
base_topic: zigbee2mqtt | |
server: 'mqtt://mqtt' | |
serial: | |
port: $ZIGBEE2MQTT_SERIAL_PORT |
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
/* Environment variables: | |
* TRAVIS_API_TOKEN | |
* TRAVIS_REPO_SLUG (%2F separated, e.g. ftes%2Fsongbook-latex) | |
*/ | |
const https = require('https') | |
const url = `https://api.travis-ci.com/repo/${process.env.TRAVIS_REPO_SLUG}/requests` | |
const options = { | |
method: 'POST', | |
headers: { |
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
-# https://johnbeatty.co/2018/03/09/stimulus-js-tutorial-how-do-i-drag-and-drop-items-in-a-list/ | |
.grid--draggable{ 'data-controller': 'seating-plan', | |
'data-seating-plan-endpoint': endpoint, | |
'data-action': 'dragstart->seating-plan#onDragStart dragover->seating-plan#onDragOver dragenter->seating-plan#onDragEnter drop->seating-plan#onDrop dragend->seating-plan#onDragEnd' } | |
- seating_plan.each do |seat| | |
- if seat[:is_empty] | |
.grid__item.grid__item--empty{ 'data-row': seat[:row], | |
'data-col': seat[:col], | |
style: "grid-row: #{seat[:row]}; grid-column: #{seat[:col]};", | |
class: ('grid__item--border' if seat[:is_border]) } |
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
-# layouts/_error_messages.html.haml | |
- if f.object.errors.any? | |
.notification.is-danger Please review the problems below: | |
- if f.object.errors[:base].present? | |
.notification.is-danger= f.object.errors[:base].join(', ') |
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
-# Example form | |
= simple_form_for @some_model do |f| | |
-# Show error notification at top (general error text) | |
= f.error_notification | |
-# Show base errors at top | |
= f.error_notification message: (f.error :base) if f.object.errors[:base].present? | |
-# Regular input | |
= f.input :name, autofocus: true | |
-# Select input referencing other model |
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 13 columns, instead of 8 in line 4.
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
base_human , base_tex, maj , sus2 , sus4 , 6 , 7 , 7sus4 , 9 , m , m6 , m7 , m9 | |
C , C , X32010:032010, (335533):113411, X330(11):034011, X3221X:043210, X3231X:032410, X3331X:023410, X3233X:021340, X3554X:013420, X312XX:031200, X(35343):013121, X3133X:021340 | |
C\shrp / D\flt, D& , XXX121:000132, 4:(113311):113411, 4:(113341):112341, X4332X:043210, X4342X:032410, XX0213:000213, X4344X:021340, X421XX:042100, X423XX:031200, X4(242)X:031410, X4244X:021340 | |
D , D , XX0232:000132, 000230:000130, X00233:000134, XX0202:000102, XX0212:000213, XX0213:000213, XX0210:000210, XX0231:000231, XX0201:000201, XX02(11):000211, 5:000120:000120 | |
D\shrp / E\flt, E& , XXX343:000132, 6:(113311):113411, 6:(113341):112341, XX101X:001020, XXX323:000213, XXX324 |
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
Steps: | |
1. `npm run start ../html ../md` (https://www.npmjs.com/package/confluence-to-markdown) | |
2. `for f in *.md; do pandoc "$f" -s -t asciidoc -o "${f%.md}.adoc"; done` | |
3. Manual cleanup (tables, images) |