Skip to content

Instantly share code, notes, and snippets.

@Fazzani
Fazzani / docker-compose.sh
Last active December 21, 2019 23:51
docker-compose
docker-compose start
docker-compose pause
docker-compose restart [options] [SERVICE...]
docker-compose stop [options] [SERVICE...]
Options:
-t, --timeout TIMEOUT Specify a shutdown timeout in seconds (default: 10).
docker-compose unpause
@Fazzani
Fazzani / webgrabconfig.xml
Created April 22, 2018 16:39
webgrabconfig.xml
<?xml version="1.0"?>
<settings>
<filename>/data/guide.xmltv</filename>
<mode>m</mode>
<postprocess grab="y" run="n">mdb</postprocess>
<logging>on</logging>
<retry time-out="5">4</retry>
<timespan>1</timespan>
<update>i</update>
@Fazzani
Fazzani / kubernetes kops aws.md
Last active April 30, 2018 08:04
kubernetes kops aws

K8S installation with KOPS

KOPS_STATE_STORE : is the source of truth for all clusters managed by Kops

  1. Kubectl Installation
apt-get update && apt-get install -y apt-transport-https &&  apt-get install -y curl
@Fazzani
Fazzani / main.csx
Last active May 25, 2018 14:13
pushbullet notification
#! "netcoreapp2.1"
#r "nuget: PushBulletSharp, 3.1.0"
//#############################################################################################################################
// dotnet script : pushbullet example
// example:
// Tinyurl api => http://tinyurl.com/api-create.php?url=http://scripting.com/
// dotnet script https://tinyurl.com/ya5chql8 -- o.tZCHwg4A9C124ba2tFiiZDf1SaHzxJzC test "message to phone" 1>&2 || echo "no"
//#############################################################################################################################
@Fazzani
Fazzani / push_to_gist.sh
Last active May 26, 2018 14:20
Push to gist
#!/bin/bash
# A bash script meant to take in user input, craft an API call to Github's Gist
# API and send the request, with content and filename filled in by the user
#Sends error on script failure
set -o errexit
USER=
FILENAME=
CONTENT=
@Fazzani
Fazzani / vscode bash settings
Created May 27, 2018 09:39
vscode bash windows settings
{
"files.exclude": {
"**/appsettings.*.json": false,
".vscode": true,
},
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\bash.exe"
}
@Fazzani
Fazzani / backup_restore_docker_postgres.sh
Last active June 3, 2018 11:54
backup/restore postgres
#!/bin/bash
#######################################################################################################################################
# References:
# https://devopsheaven.com/postgresql/pg_dump/databases/docker/backup/2017/09/10/backup-postgresql-database-using-docker.html
# using:
# curl -LJO https://gist.githubusercontent.com/Fazzani/413e4e5e5f1e6eeb91482e2f53e6c70e/raw/82cc5e81c07204912e6c79e647cd58850bcce27b/backup_restore_docker_postgres.sh
# chmod +x backup_restore_docker_postgres.sh
# ./backup_restore_docker_postgres.sh -b playlist # backup database playlist
# ./backup_restore_docker_postgres.sh -r dump_playlist.sql # restore database dump_playlist.sql
@Fazzani
Fazzani / SCSS.md
Created June 6, 2018 12:07 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@Fazzani
Fazzani / seloger_bash.ps1
Last active July 13, 2018 09:00
SeLoger bash docker aws cli and eks cli
if ( -not (test-path $PROFILE) ) {
new-item -path $PROFILE -itemtype file -force
}
Else {
$A = Get-Content $PROFILE
}
# Install notification module
if (-not (Get-Module -ListAvailable -Name BurntToast)) {
Install-Module BurntToast -Force -Confirm:$False
@Fazzani
Fazzani / synkerCast.css
Last active July 23, 2018 19:41
Synker custom style for google cast
.background {
background: center no-repeat url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzoAAANrCAYAAACOY+3mAAAgAElEQVR4XuzdCZQcZdU38P+tnkkygSQgq0JYDSRdkwQURQUVEOENkKVraCGQ7hlA4wYqiCiIGtz3LeIrKGSmOoAwmeoQRDZlUVBRlGWmJoGAKLiCskoymUzX/U7H8H4sCdM9XVVdy7/P4RBPnucuv6cludNdVQK+KEABClCAAhSgQIwEHs3n254d7x3tZfTtougAZGCiMcnau7t7KEZtsFQKUCBgAQk4PsNTgAIUoAAFKECBhgXcQu4IhRwuglkAjgCw7UuClk3bsRpOxAAUoEBiBDjoJOYo2QgFKEABClAgOQL3FnI7ZwycLJ4cBcFbAWwzaneKL5kl57xR13EBBSiQCgEOOqk4ZjZJAQpQgAIUiL5AdbhpNYwOVT1+86c2dRftqXbMLJWdujdyAwUokDgBDjqJO1I2RAEKUIACFIiPwOAi63UQmQPRYxR4iw+VPwsv8zpzee+DPsRiCApQIMYCHHRifHgsnQIUoAAFKBBHgYFCx1wRzSlwnAA7+d6D6OCw6CEHdq98yvfYDEgBCsRGgINObI6KhVKAAhSgAAXiK1C9mQBEql9JWwhgu6A7EeBXbcbkd/BObEFLMz4FoivAQSe6Z8PKKEABClCAArEWcAsdB8NAF1TzAHZoQjMrTNup5uaLAhRIoQAHnRQeOlumAAUoQAEKBCXw0OL8lKGhyomq8kERnRlUntrjyhmm3fe92tdzJQUokBQBDjpJOUn2QQEKUIACFGiSgC5ZYgw8PHCkwDtFFAsATGhSKVtKu1E9fUP78vK9EaqJpVCAAiEIcNAJAZkpKEABClCAAkkU6C/kZoghXaI4GcBuEe7xz8OGdwBvThDhE2JpFAhAgINOAKgMSQEKUIACFEiqQP8p86dKxThJICcAODA+fcp1pt13THzq