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
package main | |
import ( | |
"fmt" | |
"errors" | |
sqldriver "database/sql" | |
"github.com/hallgren/eventsourcing" | |
"github.com/davecgh/go-spew/spew" | |
"github.com/hallgren/eventsourcing/eventstore/sql" | |
"github.com/hallgren/eventsourcing/serializer/unsafe" |
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
package main | |
import ( | |
"database/sql" | |
"fmt" | |
_ "github.com/mattn/go-sqlite3" | |
"log" | |
"context" | |
"time" | |
"os" |
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
välta koner | |
https://www.youtube.com/watch?v=041_Rmr2JvU | |
vulkan | |
https://www.youtube.com/watch?v=JI9eHcBAYK4 | |
blandade övningar | |
https://www.youtube.com/watch?v=Yr_AqMLGD4s | |
tips |
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/ash | |
# MQTT SETTINGS | |
host="<mqtt_broker_url>" | |
user="<user>" | |
password="<password>" | |
port=1883 | |
topic="<topic>" | |
#ONION OMEGA2 GPIO PID SETTING | |
io_pid=6 |
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/ash | |
# MQTT SETTINGS | |
host="<mqtt_broker_url>" | |
user="<user>" | |
password="<password>" | |
port=1883 | |
topic="<topic>" | |
#ONION OMEGA2 GPIO PID SETTING | |
io_pid=0 |
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 sketch/program showing how to read data from a PICC to serial. | |
* -------------------------------------------------------------------------------------------------------------------- | |
* This is a MFRC522 library example; for further details and other examples see: https://github.com/miguelbalboa/rfid | |
* | |
* Example sketch/program showing how to read data from a PICC (that is: a RFID Tag or Card) using a MFRC522 based RFID | |
* Reader on the Arduino SPI interface. | |
* | |
* When the Arduino and the MFRC522 module are connected (see the pin layout below), load this sketch into Arduino IDE |
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
# yaks mapper | |
class UserMapper < Yaks::Mapper | |
link :self, '/api/admin/users/{user_guid}' | |
link :admin_users, '/api/admin/users' | |
link :toolbox_specific_accesses, '/api/admin/users/{user_guid}/toolbox_specific_accesses' | |
link :regions, '/api/admin/users/{user_guid}/region', if: ->{ object.regions } | |
link :plants, '/api/admin/users/{user_guid}/plant', if: ->{ object.plants } | |
has_many :regions, if: ->{ object.regions } | |
has_many :plants, if: ->{ object.plants } |
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
# yaks mapper | |
form :make_admin, if: -> { !object.admin? && !object.my_self? } do | |
action '/api/admin/users/{user_guid}' | |
method 'POST' | |
media_type 'application/json' | |
hidden :action, value: -> { 'make_admin' } | |
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
Tänkte sammanfatta vad vi pratade om och få ner lite länkar till de saker som kom upp. | |
http://reactize-todo.herokuapp.com är som @ptomasroos nämde byggt enligt ROCA http://roca-style.org/ vilket jag inte hade någon aning om när jag satte ihop den. Kul att det fanns ett namn på tankesättet. | |
Boken Adaptive Web Design http://kammerkunst.de/data/Adaptive-Web-Design.pdf beskriver hur webben var tänkt att fungera med kontent först via HTML och att sedan CSS och Javascript lades på som lager för att utöka upplevelsen för de som hade stöd för det. | |
Jag nämde att jag tagit mycket inspration från Ryan Singer från 37Signals / Basecamp på hur han designar och tänker när han skapar sina UI / Flöden. "Designing with Forces: How to Apply Christopher Alexander in Everyday Work" http://interactiondesign.sva.edu/archive/view/video_ryan_singer_lecture/ är en bra video där han beskriver hur han tänker. Diskutterar gärna denna mer ingående om du finner den intressant. | |
Ryan var även med i podcasten full stack radio http://full |
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 Sandthorn setup | |
Sandthorn.config do |sand| | |
snapshot_store = SnapshotStore.new | |
sand.event_stores = { | |
default: EventStore.new(event_driver: SequelDriver.new(url: "sqlite://my_db"), snapshot_driver: snapshot_store) | |
mongo: EventStore.new(event_driver: MongoDBDriver.new(), snapshot_driver: snapshot_store) | |
alternative: ObjectStore.new(object_driver: InMemoryDriver.new) | |
aux: InMemoryStore.new | |
} |
NewerOlder