Skip to content

Instantly share code, notes, and snippets.

View stoffeastrom's full-sized avatar

Christoffer Åström stoffeastrom

View GitHub Profile
@stoffeastrom
stoffeastrom / README.md
Last active June 28, 2017 07:25
Docker things

Remove all dangling images

docker rmi $(docker images -q --filter='dangling=true') -f

Get ip address

docker inspect --format '{{ .NetworkSettings.Networks.nat.IPAddress }}' ID

Save image

@stoffeastrom
stoffeastrom / docker_images.sh
Created June 28, 2017 07:09 — forked from hydra1983/docker_images.sh
Save and load docker images in batch
#!/bin/bash
readonly DB_FILE="$(pwd)/images.db"
readonly IMG_DIR="$(pwd)/images"
save-images() {
echo "Create ${DB_FILE}"
echo "$(docker images|grep -v 'IMAGE ID'|awk '{printf("%s %s %s\n", $1, $2, $3)}'|column -t)" > "${DB_FILE}"
echo "Read ${DB_FILE}"
@stoffeastrom
stoffeastrom / app.html
Last active March 6, 2019 11:38
Aurelia Gist TypeScript Gestures Contextmenu
<template>
<require from="oa-contextmenu"></require>
<table oa-contextmenu.call="onContextmenu()">
<tr>
<td>Gesture me!!!</td>
</tr>
</table>
</template>
@stoffeastrom
stoffeastrom / app.html
Last active February 11, 2024 23:03
Aurelia Gist TypeScript Gestures
<template>
<table oa-tap.call="onTap()">
<tr>
<td>Gesture me!</td>
</tr>
</table>
</template>
@stoffeastrom
stoffeastrom / app.html
Last active February 11, 2024 23:00
Aurelia Gist TypeScript Sortable Simple
<template>
<ul class="lui-list group"
oa-sortable="items.bind: items; allowed-drag-selector.bind: '.lui-icon--handle'; axis.bind: 'y'">
<li class="lui-list__item"
repeat.for="item of items"
oa-sortable-item="item.bind: item"
draggable="false">
<span class="lui-list__aside lui-icon lui-icon--small lui-icon--handle"></span>
<span class="lui-list__text">${item.name}</span>
<span class="lui-list__aside">
@stoffeastrom
stoffeastrom / app.html
Last active February 17, 2017 21:28
Aurelia Gist TypeScript Sortable Advanced
<template>
<ul class="lui-list groups"
oa-sortable="items.bind: groups; allowed-drag-selector.bind: '.lui-icon--handle'; axis.bind: 'y'">
<li repeat.for="group of groups"
oa-sortable-item="item.bind: group; type-flag.bind: group.typeFlag; locked-flag.bind: group.lockedFlag"
oa-sortable-item.ref="sortableGroupItem"
draggable="false">
<span class="lui-list__aside">
<span class="lui-list__header ${(sortableGroupItem.childSortable.isDisabled || sortableGroupItem.lockedFrom) ? 'lui-disabled' : ''} ${sortableGroupItem.lockedFrom ? 'locked' : ''}">
<span class="lui-list__aside lui-icon lui-icon--small lui-icon--handle"></span>
@stoffeastrom
stoffeastrom / app.html
Last active February 17, 2017 20:16
Aurelia Gist TypeScript
<template>
<h1>${message}</h1>
</template>
@stoffeastrom
stoffeastrom / app.html
Created February 16, 2017 20:31 — forked from jdanyow/app.html
Aurelia Fetch Client Gist
<template>
<require from="async"></require>
<h1>${message}</h1>
<async></async>
</template>
@stoffeastrom
stoffeastrom / app.html
Last active January 26, 2017 12:26
Aurelia Oribella Multi Sortable Gist New
<template>
<ul oa-sortable="items.bind: groups;">
<li
repeat.for="group of groups"
oa-sortable-item="item.bind: group;"
draggable="false">
<div>
${group.name}
<ul oa-sortable="items.bind: group.items;">
<li
@stoffeastrom
stoffeastrom / app.html
Last active January 11, 2017 20:17
Aurelia Oribella Sortable Table Rows Gist Old Sortable
<template>
<table sortable="scroll.bind: 'document'; items.bind: items; axis: 'y'">
<tbody>
<tr
view-cache="*"
sortable-item="item.bind: item;"
repeat.for="item of items"
draggable="false">
<td>
<div>${item.text}</div>