Skip to content

Instantly share code, notes, and snippets.

View leonardobiffi's full-sized avatar
💭
working... ☕

Leonardo Biffi leonardobiffi

💭
working... ☕
View GitHub Profile
@leonardobiffi
leonardobiffi / Remove all git tags
Created July 12, 2022 11:59 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@leonardobiffi
leonardobiffi / redis_migrate.py
Created September 14, 2021 17:04 — forked from josegonzalez/redis_migrate.py
A simple script to migrate all keys from one Redis to another
#!/usr/bin/env python
import argparse
import redis
def connect_redis(conn_dict):
conn = redis.StrictRedis(host=conn_dict['host'],
port=conn_dict['port'],
db=conn_dict['db'])
return conn
@leonardobiffi
leonardobiffi / Makefile
Created November 18, 2020 17:37 — 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)
@leonardobiffi
leonardobiffi / checkSession.php
Last active October 14, 2020 14:26 — forked from lukas-buergi/checkSession.php
Check whether sessions work in php
<?php
error_reporting( E_ALL );
ini_set( 'display_errors', 1);
if(!isset($_GET['action'])){
die('Param is missing. Look at the <a href="https://gist.github.com/2995743">source</a>.');
}
switch($_GET['action']) {
@leonardobiffi
leonardobiffi / function.py
Created February 10, 2020 13:46 — forked from brandond/function.py
Python script to auto-tag AWS EBS Snapshots and Volumes using AMI and Instance tags
import copy
import logging
import os
import boto3
logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO'))
ec2 = boto3.client('ec2')
logger = logging.getLogger(__name__)
@leonardobiffi
leonardobiffi / Popcorn-Time.desktop
Created January 26, 2020 18:51 — forked from ed-flanagan/Popcorn-Time.desktop
Gnome Popcorn Time application launcher
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Popcorn Time
Name[en_US]=Popcorn Time
GenericName=BitTorrent Stream Player
GenericName[en_US]=BitTorrent Stream Player
Comment=Run the Popcorn Time application
Comment[en_US]=Run the Popcorn Time application
Type=Application