Skip to content

Instantly share code, notes, and snippets.

View jfisbein's full-sized avatar

Joan jfisbein

View GitHub Profile
#!/bin/bash
src_git="$1"
dst_git="$2"
git clone --mirror ${src_git} migrate
cd migrate
git remote add dst ${dst_git}
git push --mirror dst
cd ..

Keybase proof

I hereby claim:

  • I am jfisbein on github.
  • I am jfisbein (https://keybase.io/jfisbein) on keybase.
  • I have a public key ASAR-HH1_imPicRhf2usrFtJE_aSodteWujmgOOFY90-7go

To claim this, I am signing this object:

@jfisbein
jfisbein / startssl_fritz.sh
Last active January 2, 2017 16:56
Install StartSSL cert in FritzBox
#!/bin/bash
# decipher key
openssl rsa -in ssl.key -out ssl.key
# download intermediate cert
wget http://www.startssl.com/certs/sub.class1.server.ca.pem
# join certs
cat ssl.crt sub.class1.server.ca.pem ssl.key > all.pem
@jfisbein
jfisbein / loteria.sh
Last active December 22, 2023 12:32
Script para chequear numeros loteria de navidad usando api de El Pais
#!/usr/bin/env bash
# Script to check Spanish Christmas Lottery
# more info: https://servicios.elpais.com/sorteos/loteria-navidad/api/
AUTO_RELOAD="120" # seconds
declare -A mainPrizes
mainPrizes['numero1']='1er Premio'
mainPrizes['numero2']='2º Premio'
@jfisbein
jfisbein / update-fritzbox-ssl.sh
Last active April 30, 2017 11:27
Script to update FritzBox ssl certificate
#!/bin/bash
FB_URL=""
SID=""
SID_FILE="/tmp/fb_sid"
function init() {
FB_URL="$1"
if [ ! -f $SID_FILE ]; then
041c76c588a00e4bd7a459f49d4b1aba17407d1bd7f45a096277a84842c1e40e4210968d91c557ccb1c0746182e8dc3311fd1ff09a159fdb49073eb5125f37ec3b
@jfisbein
jfisbein / install-oscam.sh
Last active May 12, 2024 08:59
install and update oscam on raspbian
#!/bin/bash
set -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
function install() {
@jfisbein
jfisbein / install-tvheadend.sh
Last active May 4, 2019 18:45
How to install tvheadend in raspbian
#!/bin/bash
set -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
apt-get -y install coreutils wget apt-transport-https lsb-release ca-certificates
@jfisbein
jfisbein / portainer.sh
Last active December 28, 2021 18:18
Simple script to Start, Stop an Update Portainer running in Docker under Linux and OS X
#!/usr/bin/env bash
CONTAINER_NAME="portainer"
IMAGE_NAME="portainer/portainer-ce"
PORT=9000
DATA_DIR="/opt/portainer/data"
function container-exist() {
local CONTAINER_ID=${1}
docker inspect "${CONTAINER_ID}" &> /dev/null
@jfisbein
jfisbein / fritzbox-cert-update.sh
Last active February 1, 2020 18:15 — forked from wikrie/fritzbox-cert-update.sh
Fritzbox Fritz!Box AVM SSL Letsencrypt automatically update
#!/bin/bash
MIN_EXPECTED_ARGS=4
if [ $# -lt $MIN_EXPECTED_ARGS ]; then
echo "Script to update the FritzBox SSL certificate"
echo ""
echo "Expected at least ${MIN_EXPECTED_ARGS} args"
echo ""
echo "Usage: $(basename "${0}") {username} {password} {cert-key-file} {cert-fullchain-file} [cert-password] [fritzbox-host]"
echo " - [cert-password] only needed if the {cert-key-file} is protected by a password"