Skip to content

Instantly share code, notes, and snippets.

View lguzzon's full-sized avatar
Quality Is Free - Getting There Isn't

Luca Guzzon lguzzon

Quality Is Free - Getting There Isn't
View GitHub Profile
@lguzzon
lguzzon / Dockerfile
Created January 14, 2024 15:44 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@lguzzon
lguzzon / .gitlab-ci.yml
Created February 4, 2022 14:42 — forked from thornbill/.gitlab-ci.yml
Example Node GitLab CI Yamlfile
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:6
before_script:
- npm install
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
@lguzzon
lguzzon / .env
Created February 2, 2022 13:57 — forked from eldadfux/.env
Appwrite 0.12 - Stack
_APP_ENV=production
_APP_LOCALE=en
_APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=localhost
_APP_DOMAIN_TARGET=localhost
_APP_CONSOLE_WHITELIST_ROOT=enabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=
@lguzzon
lguzzon / kustomize-deploy.sh
Created December 23, 2021 18:28 — forked from colinjfw/kustomize-deploy.sh
Kubernetes deployment strategy using Kustomize and a few basic tools. Replaces helm charts with simple tooling solutions.
# Kustomize based apply workflow. Requires jq, yq, kubectl, kustomize, mustache.
#
# Expected variables
# - namespace Namespace for all resources.
# - release A unique name to give to this collection of manifests.
# - revision Release revision.
# - images Image replacements.
# - variables Variable replacements.
#
# Example inputs:
@lguzzon
lguzzon / script-template.sh
Created December 15, 2020 09:16 — 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
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
trap cleanup SIGINT SIGTERM ERR EXIT
usage() {
cat <<EOF
@lguzzon
lguzzon / cloudSettings
Last active August 17, 2021 09:15
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-08-17T09:15:33.203Z","extensionVersion":"v3.4.3"}
@lguzzon
lguzzon / cloudSettings
Created November 3, 2020 14:26
Visual Studio Code Settings Sync Gist
// Empty
@lguzzon
lguzzon / cloudSettings
Last active January 5, 2021 21:53
settingSync-NODEJS
{"lastUpload":"2021-01-05T21:53:44.109Z","extensionVersion":"v3.4.3"}
@lguzzon
lguzzon / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created January 8, 2018 11:20 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
import macros
macro doNothing(input: untyped): untyped =
echo treeRepr input
result = input
echo input.toStrLit
doNothing:
echo "hello world"