Skip to content

Instantly share code, notes, and snippets.

View zakjan's full-sized avatar

Jan Žák zakjan

View GitHub Profile
❯ docker-compose -f gitea.docker-compose.yml up
[+] Running 1/1
⠿ Container gitea Recreated 0.3s
Attaching to gitea
gitea | Server listening on :: port 22.
gitea | Server listening on 0.0.0.0 port 22.
gitea | 2022/10/10 09:46:03 cmd/web.go:106:runWeb() [I] Starting Gitea on PID: 16
gitea | 2022/10/10 09:46:03 cmd/web.go:157:runWeb() [I] Global init
gitea | 2022/10/10 09:46:03 routers/init.go:104:GlobalInitInstalled() [I] Git Version: 2.36.2, Wire Protocol Version 2 Enabled (home: /data/gitea/home)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zakjan
zakjan / d3-force-webworker-layout.js
Last active March 13, 2020 07:23
d3-force WebWorker layout
function runLayout(graph) {
return new Promise(resolve => {
const workerCode = `
importScripts('https://unpkg.com/d3@5.14.2/dist/d3.min.js');
function runLayout(graph) {
const { nodes, links } = graph;
d3.forceSimulation(nodes)
.force('link', d3.forceLink(links).id(d => d.id))
@zakjan
zakjan / socfb-Caltech36.json
Created January 29, 2020 22:07
Graph samples
This file has been truncated, but you can view the full file.
{
"nodes": [
{
"id": "358"
},
{
"id": "6004"
},
{
"id": "2108"
@zakjan
zakjan / HelveticaRegular.fnt
Last active July 5, 2021 03:02
HelveticaRegular.fnt
<?xml version='1.0'?>
<font>
<info aa='1' size='50' smooth='1' stretchH='100' bold='0' padding='0,0,0,0' spacing='0,0' charset='' italic='0' unicode='0' face='HelveticaRegular'/>
<common scaleW='384' packed='0' pages='1' lineHeight='50' scaleH='320' base='39'/>
<pages>
<page id='0' file='HelveticaRegular.png'/>
</pages>
<chars count='95'>
<char xadvance='14' x='46' chnl='0' yoffset='39' y='42' xoffset='0' id='32' page='0' height='0' width='0'/>
<char xadvance='14' x='226' chnl='0' yoffset='3' y='200' xoffset='6' id='33' page='0' height='38' width='8'/>
@zakjan
zakjan / app.html
Created January 3, 2017 17:37
Aurelia Gist
<template>
<require from="./container"></require>
<button click.delegate="toggle()">Toggle</button>
<container>
<template if.bind="true">
<template if.bind="tab === 1">
1
</template>
<template if.bind="tab === 2">
@zakjan
zakjan / app.html
Last active July 26, 2018 16:03 — forked from jdanyow/app.html
compose with class ref activation
<template>
<h1>${message}</h1>
<div style="display: grid; grid-gap: 20px; grid-template-columns: repeat(2, 1fr)">
<div>
<b>String path:</b>
<br><br>
<template repeat.for="item of items">
<compose view-model="./item" model.bind="{item}"></compose>
</template>
@zakjan
zakjan / app.html
Last active November 27, 2016 12:32
Aurelia Gist
<template>
<h1>${message}</h1>
<ul>
<li repeat.for="item of items">
<input type="checkbox" model.bind="item" checked.bind="selectedItems" matcher.bind="matcher">
<input type="checkbox" model.bind="item" checked.bind="selectedItems" matcher.bind="matcher.bind($this)">
<input type="checkbox" model.bind="item" checked.bind="selectedItems" matcher.bind="matcher.bind(this2)">
${item.type} ${item.id}
</li>
</ul>
@zakjan
zakjan / app.html
Last active November 23, 2016 06:28
Aurelia Gist
<template>
<require from="./item"></require>
<h1>${message}</h1>
<ul>
<li repeat.for="item of items">
<input type="checkbox" model.bind="item" checked.bind="selectedItems" matcher.bind="matcher">
<input type="checkbox" model.bind="item" checked.bind="selectedItems" matcher.bind="matcher.bind($this)">
<input type="checkbox" model.bind="item" checked.bind="selectedItems" matcher.bind="matcherBound">
<input type="checkbox" model.bind="item" checked.bind="selectedItems" matcher.call="matcherBound(item1, item2)">
@zakjan
zakjan / app.html
Created November 23, 2016 05:50
Aurelia Gist
<template>
<require from="./item"></require>
<h1>${message}</h1>
<ul>
<li repeat.for="item of items">
${item}:
<item item.bind="item" click-handler.bind="itemClicked" title="itemClicked"></item>
<item item.bind="item" click-handler.bind="itemClicked.bind($this)" title="itemClicked.bind($this)"></item>
<item item.bind="item" click-handler.bind="itemClickedBound" title="itemClickedBound"></item>