Skip to content

Instantly share code, notes, and snippets.

@chachan
chachan / 55-bytes-of-css.md
Created September 29, 2022 11:03 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
apiVersion: v1
kind: Pod
metadata:
name: debian
spec:
containers:
- name: debian
args: ["trap : TERM INT; sleep infinity & wait"]
command: ["/bin/bash", "-c", "--"]
image: debian:11-slim
project_name/
README.rst
docs/
src/
package_name/
__init__.py
more_source.py
subpackage1/
__init__.py
tests/
@chachan
chachan / script-template.sh
Created January 12, 2021 09:42 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
Rank Type Prefix/Suffix
1. Prefix my+
2. Suffix +online
3. Prefix the+
4. Suffix +web
5. Suffix +media
6. Prefix web+
7. Suffix +world
8. Suffix +net
9. Prefix go+
@chachan
chachan / README.md
Created March 6, 2020 01:04 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
import logging
logging.root.manager.loggerDict
@chachan
chachan / Makefile
Created April 11, 2019 15:29 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@chachan
chachan / get-host.ip.sh
Created October 24, 2017 01:17 — forked from iocanel/get-host.ip.sh
Get the docker host ip inside Kubernetes
#!/bin/bash
KUBERNETES=https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT
TOKEN=`cat /var/run/secrets/kubernetes.io/serviceaccount/token`
POD=`hostname`
curl -s -k -H "Authorization: Bearer $TOKEN" $KUBERNETES/api/v1/namespaces/$KUBERNETES_NAMESPACE/pods/$POD | grep -i hostIp | cut -d "\"" -f 4
@chachan
chachan / echo.sh
Created June 15, 2017 15:59
echo "hello world" on specific port
PORT=8000
while true; do echo "hello world" | nc -l ${PORT}; done