-
Install
Xquartz
to get X11 support on MacOS. You can googleXquartz
and download it from its official site, or install using HomeBrew.brew cask install xquartz
-
Launch
Xquartz
. Go toPreference
->Security
, click the boxAllow connections from clients
. NOTE: You have to lauchXquartz
withAllow connections from clients
enable everytime you want tossh
to remote server with X11 forwarding support.
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
# Generate a Random Password | |
generate_random () { | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1 | |
} |
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 | |
name=$RANDOM | |
url='http://localhost:9093/api/v1/alerts' | |
echo "firing up alert $name" | |
# change url o | |
curl -XPOST $url -d "[{ | |
\"status\": \"firing\", |
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
<?php error_reporting(E_ALL); | |
function test() {} | |
$nIter = 1000000; | |
$argNums = [0, 1, 2, 3, 4, 5, 100]; | |
$func = 'test'; | |
foreach ($argNums as $argNum) { |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000