Skip to content

Instantly share code, notes, and snippets.

@voku
Created February 10, 2022 00:30
Show Gist options
  • Save voku/32d3219f46edd6e118d9356111cd5c62 to your computer and use it in GitHub Desktop.
Save voku/32d3219f46edd6e118d9356111cd5c62 to your computer and use it in GitHub Desktop.
#!/usr/bin/php
<?php
$output = [];
exec('[ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && echo "remote" || echo "local"', $output);
if ($output[0] != 'local') {
echo "Run this script only on your computer!\n\n";
// @codingStandardsIgnoreStart
exit(1);
// @codingS
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment