Skip to content

Instantly share code, notes, and snippets.

View zored's full-sized avatar
🏠
Working from home

Robert Akhmerov zored

🏠
Working from home
View GitHub Profile
@zored
zored / tunnelbear-toggle.sh
Last active August 30, 2022 12:15
Toggle TunnelBear from macOS console. Enable or disable TunnelBear VPN with CLI. Compatable with TunnelBear 3.8.0. Based on SH and AppleScript.
#/usr/bin/env bash
# Include this file in `~/.bash_profile` with `source /path/to/tunnelbear-toggle.sh`.
# Toggle TunnelBear activity.
#
# Example usage:
# `tunnelbear-toggle`
# `tunnelbear-toggle 1`
tunnelbear-toggle ()
{
@zored
zored / convert.php
Last active March 28, 2017 15:34
Convert comments to one-line when possible.
#!/usr/bin/env php
<?php
$path = $argv[1];
if (empty($path)) {
echo "Path is not set.";
exit(1);
}
file_put_contents(