Skip to content

Instantly share code, notes, and snippets.

View MartinMuzatko's full-sized avatar
🐈

Martin Muzatko MartinMuzatko

🐈
View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@MartinMuzatko
MartinMuzatko / beautify-sql-schema.js
Last active April 27, 2024 05:41
Create SQLITE schema and format it
const sqlFormatter = require('sql-formatter')
const promisify = require('promisify-node')
const fs = promisify('fs')
const path = require('path')
const INDENT = '\t'
const SCHEMAFILE = path.resolve(__dirname, 'schema.sql')
(async () => {
try {
@MartinMuzatko
MartinMuzatko / gist:18bfb4f72de5abca72c40c22a202ba9c
Last active April 27, 2024 05:41
Information Architecture Cheatsheet
How do you get that JSON?
Data is what drives our apps and tools.
Whenever you need data, you need to figure out what is the best way to use that data in the front-end.
Depending on your options and the way you use that data, you can figure out what to do with it.
Control over the data
Does it belong to you? Have you created the data?
Can you host it?
Is it static?
Is it dynamic?
Does it have to be managed? By Who?
@MartinMuzatko
MartinMuzatko / error.log
Created April 16, 2018 11:07
vuepress dev with ejected theme errors
root@martin ~/dev/github/vuepress-test [13:05:42]
> # vuepress dev
VuePress dev server listening at http://localhost:8080/
✖ 「wdm」: Hash: 482d59b7699f3b63f858
Version: webpack 4.5.0
Time: 14647ms
Built at: 2018-4-16 12:05:56
Asset Size Chunks Chunk Names
Wolf: 25
Drache: 15
Fuchs: 12
Husky: 11
no species: 9
Tiger: 4
Löwe: 4
Katze: 4
Gepard: 3
Hyäne: 3
export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData // site metadata
}) => {
Vue.prototype.$getPosts = (maxPosts = 10) => {
let posts = siteData.pages
.filter(page =>
page.frontmatter.layout == 'Post' &&
/**
* This module takes care about installing, listing, disabling/enabling and managing apps
* Apps are folders run as static server within server/frontend (they are driven by staticservers.hjson)
*/
// read config files
const Config = require('./config');
const constants = require('./constants');
const staticservers = new Config(constants.STATICSERVERSCONFIGPATH);
const serverconfig = require('./serverconfig')
import test from 'ava'
import apps from './apps'
import promisify from 'promisify-node'
const fs = promisify('fs')
const constants = require('./constants');
test.before(async t => {
await fs.copyFile(constants.STATICSERVERSCONFIGPATH, constants.STATICSERVERSCONFIGPATH+'.backup')
})
<template>
<div class="page">
<Header
v-if="title"
:title="title"
:description="$page.frontmatter.description"
:header-image="$page.frontmatter.headerImage"
:header-position="$page.frontmatter.headerPosition"
/>
<div class="content">
@MartinMuzatko
MartinMuzatko / config.js
Last active April 27, 2024 05:31
Vuepress open graph metadata
let ogprefix = 'og: http://ogp.me/ns#'
let title = 'Wire Up Your Front-End'
let description = 'Get your personal guide to finally piece together the missing puzzles to communicate with your server'
let color = '#f42525'
let author = 'Martin Muzatko'
module.exports = {
title,
description,
serviceWorker: true,