Skip to content

Instantly share code, notes, and snippets.

@allebb
allebb / mssqlbackup
Last active May 31, 2024 07:57
Shell script to backup Microsoft SQL Server vNEXT databases on Linux.
#!/usr/bin/env bash
#
# Shell script to automate the backup of Microsoft SQL Server vNEXT backups on Linux.
# Written by Bobby Allen <ballen@bobbyallen.me>, 26/04/2017
#
# Download this script and put into your servers' /usr/bin directory (or symlink) then make it executable (chmod +x)
#
# Usage example (backup databases into /var/backups, keep backups for 5 days, connect to server "localhost" with the account "sa" and a password of "P455w0RD"):
# mssqlbackup "/var/dbbackups" 5 "localhost" "sa" "P455w0rD"
@mikejolley
mikejolley / functions.php
Last active February 5, 2024 15:33 — forked from claudiosanches/functions.php
WooCommerce - Hide shipping rates when free shipping is available.
<?php
/**
* Hide shipping rates when free shipping is available.
* Updated to support WooCommerce 2.6 Shipping Zones.
*
* @param array $rates Array of rates found for the package.
* @return array
*/
function my_hide_shipping_when_free_is_available( $rates ) {
$free = array();
@steveclason
steveclason / aggregate_files.php
Created May 26, 2016 21:57
Override Header Layout in Avada Child Theme
<?php
/* Override (modify) the Avada header layouts in a child theme by establishing a local version. */
/* Avada has 6 header layouts selectable via Avada > Theme Options > Header > Header Content. These map to files at
"/wp-content/themes/Avada/templates". You can use your browser's devtools to look in the header for something like
'<div class="fusion-header-v1 ... ">' which will help identify what's being used, if you don't already know.
*/
// Copy this block from "/wp-content/themes/Avada/templates/header.php". If you are not using header_1 then copy the appropriate block.
if ( ! function_exists( 'avada_header_1' ) ) {

Reverse proxy over 3G modem (draft)

We will explain how to configure a cubieboard running debian as a reverese proxy. The modules that will be used are wvdial and autossh

Credits goes to:

1. http://blog.rootshell.be/2015/02/19/my-little-pwnie-box/
2. https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd
@ziogaschr
ziogaschr / debian-wvdial-ppp0-interface-autossh.markdown
Last active July 31, 2023 13:50
Reverse proxy over 3G modem (draft)

Reverse proxy over 3G modem (draft)

We will explain how to configure a cubieboard running debian as a reverese proxy. The modules that will be used are wvdial and autossh

Credits goes to:

1. http://blog.rootshell.be/2015/02/19/my-little-pwnie-box/
2. https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd