Skip to content

Instantly share code, notes, and snippets.

View cannap's full-sized avatar
💥
Working from home

Marko Bolliger cannap

💥
Working from home
View GitHub Profile
@cannap
cannap / schema.json
Last active September 26, 2022 09:24
Sellerpoint - Page Schema
{
"_version": "1",
"rows": [
{
"_version": "1",
"title": "so we know what we edit",
"id": "$uid",
"settings": {
"background": {
"url": "https://",
<template>
<div v-if="getPath()">
<slot></slot>
</div>
</template>
<script>
import { get, isObject } from 'lodash-es';
export default {
fgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgefgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgefgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgefgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgewrgregtehzrfgefgew
(function($) {
// cache some values
var cache = {
idx_expanded : -1, // the index of the current expanded slice
sliceH : 0, // the default slice's height
current : 0, // controls the current slider position
totalSlices : 0 // total number of slices
},
aux = {
@cannap
cannap / bla.js
Last active March 13, 2020 20:49
{{`${invoice.firstName} ${invoice.lastName}`}}
<template functional>
<div class="number">
<div class="number__inner">
<div class="number__holder">{{ number }}</div>
</div>
</div>
</template>
<script>
export default {
import Echo from 'laravel-echo'
import Vue from 'vue'
window.io = require('socket.io-client')
const host = process.env.WEBSOCKET
/**
* In Components you can now write
* socket: {
channels: [
{
'nice-public': {
Child
<template>
<no-ssr>
<vuetable
ref="vuetable"
:api-url="apiURL"
:slots="$slots"
v-bind="tableOptions"
v-on="$listeners" />
<!-- here i want to use the slots from the other components -->
const path = require('path')
const { readFile, writeFile } = require('fs').promises
const glob = require('fast-glob')
const mjml2html = require('mjml')
const outputExtension = 'hbs'
async function start () {
// Todo: clear emails before
const templates = await glob('./src/emails/**/*.mjml')
try {
const compiledTemplates = await Promise.all(
# Automate npm updating when using nvm-windows
# Installs npm@latest for the current active node install
# Source: https://github.com/coreybutler/nvm-windows/issues/300#issuecomment-368192283
$ErrorActionPreference = "Stop"
# Create a folder in the Temp directory and return it
# Source: https://stackoverflow.com/a/34559554/9165387
function New-TemporaryDirectory {
$parent = [System.IO.Path]::GetTempPath()
$name = [System.IO.Path]::GetRandomFileName()