Skip to content

Instantly share code, notes, and snippets.

View jerryjappinen's full-sized avatar

Jerry Jäppinen jerryjappinen

View GitHub Profile
@jerryjappinen
jerryjappinen / 8base.yml
Last active February 15, 2022 18:58
Scoped uniqueness on 8base via triggers
# https://docs.8base.com/docs/8base-console/custom-functions/triggers/
functions:
beforeProjectCreate:
handler:
code: triggers/beforeProjectCreate.js
type: trigger.before
operation: Project.create
description: Enforce unique Project slugs within a team upon create
beforeProjectUpdate:
@jerryjappinen
jerryjappinen / observableEmbedWorkaround.js
Created October 10, 2021 08:52
Observable embed workaround
Object.assign(html`<iframe style="width:100%;height:505px;border:none;">`, {
srcdoc: `
<!DOCTYPE html>
<script crossorigin src="https://www.wolframcdn.com/notebook-embedder/0.1/wolfram-notebook-embedder.js"></script>
<div id="410a0f8d-0a9d-44f8-a72c-bdc9853ce4e8-24271-57612"></div>
<script>
WolframNotebookEmbedder.embed(
"https://www.wolframcloud.com/obj/demonstrations/Published/3DVectorFields",
document.getElementById("410a0f8d-0a9d-44f8-a72c-bdc9853ce4e8-24271-57612"), {allowInteract: true}
);

brand-grid-web

Grid visualisation used in branding materials.

JSON config

Position

Describe the position of the sculpture. Y Axis points up. Z axis is distance.

<script>
export default {
name: 'Page',
props: {
buffer: {
default: true
}
},
@jerryjappinen
jerryjappinen / mixin-layout.js
Created September 2, 2018 09:58
Nuxt.js layout mixin
export default {
head () {
const page = (this.hasNuxtError ? 'error' : this.currentPage)
return {
// I have to do all of this here, since won't be combined
bodyAttrs: {
class: [