This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script to turn on/off NATting through to a VPN server. | |
# Example would be turning the mac into a wireless router, and routing all the incoming | |
# traffic to the VPN server. | |
# Thanks to http://rodrigo.sharpcube.com/2010/06/20/using-and-sharing-a-vpn-connection-on-your-mac/ | |
case "$1" in | |
on) | |
echo "Turning NAT VPN on." | |
natd -interface tun0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Author: Nick Dunn | |
# | |
# This script takes as input the path to a .kmz file and outputs a directory | |
# full of the contents of that .kmz file, named the same as the .kmz file without | |
# the kmz suffix. Thus | |
# ./openkmz.sh /path/to/mykmz.kmz | |
# would result in a new directory being created at /path/to/mykmz filled with the contents | |
# of mykmz.kmz. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <sys/stat.h> | |
#include <stdint.h> | |
#include <libgen.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char * argv[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# SPDX-License-Identifier: MIT | |
## Copyright (C) 2009 Przemyslaw Pawelczyk <[email protected]> | |
## | |
## This script is licensed under the terms of the MIT license. | |
## https://opensource.org/licenses/MIT | |
# | |
# Lockable script boilerplate | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'osx/foundation' | |
OSX.require_framework '/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework' | |
include OSX | |
$d=File.basename Dir.pwd | |
Dir.chdir '..' | |
fsevents_cb = proc do |stream, ctx, numEvents, paths, marks, eventIDs| | |
system "rsync --delete -rt --rsh=ssh '#{$d}' 'methylblue.com:public_html/'" |