Skip to content

Instantly share code, notes, and snippets.

services:
backend:
image: web:v7
build:
context: https://github.com/lalyos/docker-lufi-2023-09-26.git
tags:
- lalyos/web
- ttl.sh/web
environment:
- TITLE=Dinner [dev]
@lalyos
lalyos / compose.yaml
Last active September 15, 2023 08:42
services:
coffee:
image: lalyos/12factor
ports:
- 80
environment:
- TITLE=Coffebreak LEVEL 2.
- COLOR=gray
backend:
image: lalyos/12factor
@lalyos
lalyos / main.go
Last active September 11, 2023 17:44
goplay example
package greet
import (
"fmt"
)
func Greet() {
fmt.Println("Greating from golpay package [gist] ... v1.3")
}
@lalyos
lalyos / README.md
Last active October 19, 2022 15:39
Recording bash's standard out

If you want to store all stdout while runing an interactive bash:

Install

curl -Lo /usr/local/bin/cybash https://gist.githubusercontent.com/lalyos/94cef8ca8bb3087387312f7f3e775e3b/raw/cybash
chmod +x /usr/local/bin/cybash

Usage

@lalyos
lalyos / Dockerfile
Last active October 19, 2022 05:50
Test figlets
FROM alpine
RUN apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing lolcat curl
CMD curl -sL https://gist.githubusercontent.com/lalyos/99341041e6b513a05ac945c897ef518e/raw/network.txt | lolcat
@lalyos
lalyos / README.md
Last active September 30, 2022 13:32
LZ-string decoder in go flems.io

LZ-string decoder in go

I was playing with https://flems.io/ and wondered how it stores data.

  • locally it uses localstorage
  • but state is preserved in url (bookmarkable POC)

Example link: http://flems.io

Usage

@lalyos
lalyos / index.html
Created March 28, 2022 10:17
JS Countdown Timer
<div id="app"></div>
@lalyos
lalyos / index.pug
Created March 27, 2022 19:21
Quick pure CSS counter
- let d = 100, o = -.5*d;
- let sw = .1*d, r = .5*(d - sw);
- let len = 2*Math.PI*r;
.countdown
svg(viewBox=[o, o, d, d].join(' ') stroke-width=sw)
circle(r=r)
circle(r=r stroke-dasharray=len stroke-dashoffset=`${len}px`)
@lalyos
lalyos / appify.sh
Created March 24, 2022 05:48 — forked from oubiwann/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/usr/bin/env bash
VERSION=4.0.1
SCRIPT=`basename "$0"`
APPNAME="My App"
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns"
OSX_VERSION=`sw_vers -productVersion`
PWD=`pwd`
function usage {
@lalyos
lalyos / install-k8s-kubeadm.sh
Last active March 17, 2022 14:04
install k8s with kubeadm
## containerd prereq
modprobe br_netfilter
modprobe overlay
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf
overlay
br_netfilter
EOF
cat <<EOF | sudo tee /etc/sysctl.d/99-kubernetes-cri.conf