Skip to content

Instantly share code, notes, and snippets.

View nicolabeghin's full-sized avatar

Nicola Beghin nicolabeghin

View GitHub Profile
@oleksandriegorov
oleksandriegorov / lb-manager-client.sh
Last active April 24, 2020 20:45 — forked from thomasdarimont/lb-manager-client.sh
Shell script to configure load- balancing with mod-proxy-balancer
#! /bin/sh
# Set up a default search path
PATH="/usr/bin:/bin"
CURL=`which curl`
if [ -z "$CURL" ]; then
echo "curl not found"
exit 1
fi
@sethbergman
sethbergman / install-docker.sh
Last active December 27, 2021 16:38 — forked from dweldon/install-docker.sh
Install Docker CE on Linux Mint 19
#!/usr/bin/env bash
set -e
# https://docs.docker.com/engine/install/ubuntu/
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 2>/dev/null
sudo echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') bionic stable" > /etc/apt/sources.list.d/docker.list
sudo apt-get -y update
@Rillke
Rillke / mariadb-docker-dumpcreate.md
Last active June 13, 2021 17:24
Restore database dump to mariadb docker container

Create database dump from MariaDB Docker container

docker-compose exec mariadb sh -c \
  'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' \
  ____encoding____

encoding

@jkubecki
jkubecki / ExportKindle.js
Last active February 25, 2024 00:45
Amazon Kindle Export
// The following data should be run in the console while viewing the page https://read.amazon.com/
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
var db = openDatabase('K4W', '3', 'thedatabase', 1024 * 1024);
getAmazonCsv = function() {
// Set header for CSV export line - change this if you change the fields used
var csvData = "ASIN,Title,Authors,PurchaseDate\n";
db.transaction(function(tx) {
@acrookston
acrookston / adb-all
Last active March 3, 2023 07:00
Script to execute an adb command on all connected devices. eg: adb-all uninstall com.example.test
#!/bin/bash
DEVICES=`adb devices | tail -n +2 | cut -f1`
for DEVICE in $DEVICES
do
RUN="adb -s $DEVICE $@"
echo $RUN
${RUN}
done