Covers different areas of programming and the best practices/components explained.
A crate that contains a trait StructOpt. Allows a structure Opt to be converted
#!/bin/bash | |
echo "Creating backup folder if one doesn't exist already..." | |
mkdir -p ./backups/3.5.3/ | |
echo "Backing up the Mastodon Database" | |
docker exec mastodon-db-1 pg_dump -Fc -U postgres postgres > ./backups/3.5.3/pg-3.5.3.dump | |
echo "Assuming docker-compose.yml exists in this directory, replacing v3.5.3 with v4.0.0" | |
sed -i 's/v3.5.3/v4.0.0/g' docker-compose.yml | |
echo "Pulling new versions from dockerhub" | |
docker compose pull | |
echo "Performing Pre-deployment database migrations..." |
Covers different areas of programming and the best practices/components explained.
A crate that contains a trait StructOpt. Allows a structure Opt to be converted
apply plugin: 'maven-publish' | |
publishing { | |
publications { | |
mavenJava(MavenPublication) { | |
from components.java | |
} | |
} | |
} |
#!/bin/bash | |
OLDIFS=$IFS | |
export IFS=$'\n' | |
# Find all boxes which have updates | |
AVAILABLE_UPDATES=$(vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2 2>/dev/null) | |
if [[ ${#AVAILABLE_UPDATES[@]} -ne 0 ]]; then |
This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
function logClass(target: any) { | |
// save a reference to the original constructor | |
var original = target; | |
// a utility function to generate instances of a class | |
function construct(constructor, args) { | |
var c : any = function () { | |
return constructor.apply(this, args); | |
} |
#!/usr/bin/python | |
import subprocess | |
DOCUMENTATION = ''' | |
--- | |
module: postfix | |
short_description: changes postfix configuration parameters | |
description: | |
- The M(postfix) module changes postfix configuration by invoking 'postconf'. |
Disable vim automatic visual mode on mouse select | |
issue: :set mouse-=a | |
add to ~/.vimrc: set mouse-=a | |
my ~/.vimrc for preserving global defaults and only changing one option: | |
source $VIMRUNTIME/defaults.vim | |
set mouse-=a |