Skip to content

Instantly share code, notes, and snippets.

@igorsokolov
igorsokolov / transporter_chief.rb
Created July 12, 2012 07:19
Transporter Chief - upload iOS application to iOS devices
#!/usr/bin/ruby
require 'optparse'
require 'ostruct'
require 'fileutils'
require 'pathname'
require 'tmpdir'
$script_path = File.expand_path(File.dirname(__FILE__))
$temp_path = Dir.mktmpdir
@Apsu
Apsu / failover.sh
Last active February 12, 2024 07:08
An example failover script for dual WAN, using a ping healthcheck and managing default routes appropriately
#!/bin/bash
# Set defaults if not provided by environment
CHECK_DELAY=${CHECK_DELAY:-5}
CHECK_IP=${CHECK_IP:-8.8.8.8}
PRIMARY_IF=${PRIMARY_IF:-eth0}
PRIMARY_GW=${PRIMARY_GW:-1.2.3.4}
BACKUP_IF=${BACKUP_IF:-eth1}
BACKUP_GW=${BACKUP_GW:-2.3.4.5}