Skip to content

Instantly share code, notes, and snippets.

View pleasemarkdarkly's full-sized avatar
🎯
Pushing buttons.

pleasemarkdarkly

🎯
Pushing buttons.
  • Earth
View GitHub Profile
@pleasemarkdarkly
pleasemarkdarkly / netatalk_install.sh
Last active January 7, 2020 09:52
Single install script for netatalk, avahi, backing up configs, menu driven. Ubuntu 19.04, Raspberry Pi 4.
#!/bin/bash
# http://netatalk.sourceforge.net/wiki/index.php/Install_Netatalk_3.1.12_on_Ubuntu_18.10_Cosmic
# gist: https://gist.github.com/21d090cba63cff6a8377f5831d71e54d
# wget http://bit.ly/2T6lSNc -O netatalk_install.sh; chmod +x netatalk_install.sh;
trap "exit 1" HUP INT PIPE QUIT TERM
trap cleanup EXIT
session="$(date '+%F-%H%M-%S')"
@pleasemarkdarkly
pleasemarkdarkly / nano_4.9.3_install.sh
Last active August 30, 2020 08:41
Bash script 5.1 installer for Ubuntu 19.04 and macOS X.
#!/bin/bash
# https://transfersh.pleasemarkdarkly.com/KvzPx/nano_install.sh
# gist-paste ./nano_install -u 73bed407e5f88c633bcafb78349ca322
#
# https://gist.github.com/73bed407e5f88c633bcafb78349ca322
# name="nano"
# this="http://bit.ly/39VJiLw"
# curl "$this" -O "$name"; chmod +x "$name"
#!/usr/bin/env bash
#--------------------------------------------------------------------------------------------------
#
# set -e
version="0.0.1"
this_script="${0%.sh}"
project="bash template"
#
#--------------------------------------------------------------------------------------------------
@pleasemarkdarkly
pleasemarkdarkly / ad_images.sh
Last active January 9, 2020 13:45
Convert a folder of images into FB friendly ads with watermark.
#!/bin/bash
# debug
image_count=0
max_images=400
# arguments
source_images=""
dest_images=""
#!/bin/bash
function nano_install () {
wget https://www.nano-editor.org/dist/v4/nano-4.7.tar.xz
tar -xvf nano-4.7.tar.xz
cd nano-4.7
./configure --prefix=/usr \
--sysconfdir=/etc \
--enable-utf8 \
--docdir=/usr/share/doc/nano-4.7 &&
@pleasemarkdarkly
pleasemarkdarkly / docker-compose.yml.mautic
Last active January 16, 2020 18:32
mautic stack, after starting up, chmod -R a+rwx on mautic_db and then restart db
version: "3"
services:
percona:
image: percona/percona-server:5.7
container_name: percona
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
restart: always
ports:
- 3306:3306
environment:
session=$(date "+%F_%T")
echo "sourcing webpages.list"
source ./webpages.list
set -m # Enable Job Control
number=0
for topics in "${webpages[@]}"; do
if [ $((number % 2)) -eq 0 ]; then
@pleasemarkdarkly
pleasemarkdarkly / config
Last active January 26, 2020 06:50
todo.sh install config
# === EDIT FILE LOCATIONS BELOW ===
# Your todo.txt directory (this should be an absolute path)
export TODO_DIR="$HOME/.todo"
#export TODO_DIR=$(dirname "$0")
# Your todo/done/report.txt locations
export TODO_FILE="$TODO_DIR/todo.txt"
export DONE_FILE="$TODO_DIR/done.txt"
export REPORT_FILE="$TODO_DIR/report.txt"
@pleasemarkdarkly
pleasemarkdarkly / todo.txt-cli_install.sh
Last active January 28, 2020 06:29
todo.txt-cli app install
#!/usr/bin/env bash
git clone https://github.com/todotxt/todo.txt-cli
cd todo.txt-cli
make
make install
make test
eche "customization of paths as follows"
echo "make install CONFIG_DIR=/etc INSTALL_DIR=/usr/bin BASH_COMPLETION_DIR=/usr/share/bash-completion/completions"
const program = require('commander'),
replace = require('replace-in-file'),
chalk = require('chalk'),
normal = chalk.blue,
error = chalk.bold.red,
warning = chalk.keyword('orange');
const EmailValidator = require('email-deep-validator'),
lineByLine = require('n-readlines'),
fs = require('fs');