Skip to content

Instantly share code, notes, and snippets.

View cmizzi's full-sized avatar
🏠
Working from home

Cyril Mizzi cmizzi

🏠
Working from home
View GitHub Profile
@leeovery
leeovery / laravel-airlock-nuxt-auth-strategy.js
Last active March 8, 2020 09:21
Laravel Airlock Nuxt Stategy
export default class AirlockScheme {
constructor(auth, options) {
this.$auth = auth;
this.name = options._name;
this.options = Object.assign({}, DEFAULTS, options);
}
mounted() {
this.$auth.ctx.app.$axios.defaults.withCredentials = true;
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active December 12, 2025 00:03
set -e, -u, -o, -x pipefail explanation
@rubot
rubot / docker_ufw_setup.sh
Last active September 17, 2024 16:19
easy fix for DOCKER-USER and ufw
#!/usr/bin/env bash
set -eu
# Solves the problem with open ports with docker and ufw
# As Docker uses the nat table, the filter table FORWARD chain is used and does not touch ufw-input chains as expected.
# Even for ufw-forward chains it would not work, as DOCKER chains are inserted in front.
# This is a simple fix that worked for me.
# https://github.com/moby/moby/issues/4737#issuecomment-420264979
# Unfortunately this fix stops forwarding users origin ip to host mode configured service
@davidpiesse
davidpiesse / tailwind_md_colours.js
Last active November 30, 2020 21:35
Replace the default (still great) colors from Tailwind to those from Material Design maintaining the Tailwind naming convention
//Notes
//
//For mapping the 100-900 colors we have mapped as follows:
//darkest:900
//darker:700
//dark:600
//base:500
//light:400
//lighter:300
//lightest:100
@santouras
santouras / db.dev
Created May 25, 2012 00:55
bind setup for local wildcard domains on .dev domain
$TTL 60
dev. IN SOA icecream root.icecream.dev (
472 ; Serial
10 ; Refresh
10 ; Retry
120 ; Expire
120 ) ; Negative Cache TTL
;
dev. IN NS icecream.dev.