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 | |
/** | |
* Get the appropriate HTTP Status Text for a given Status Code as per the IETF Status Code Registry: | |
* https://www.ietf.org/assignments/http-status-codes/http-status-codes.xml | |
* | |
* @param integer $code HTTP Status Code | |
* | |
* @return string HTTP Status Text | |
*/ |
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/env bash | |
echo "Step 1 - Created directories to store diag results..." | |
mkdir -p ./lc-diag/ping | |
mkdir -p ./lc-diag/traceroute | |
mkdir -p ./lc-diag/host | |
echo "Step 1 - DONE!" | |
echo "========================" |
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
import numpy as np | |
from bokeh.plotting import figure, output_file, show | |
output_file('plotting_sample.html') | |
p = figure(plot_width=1200, plot_height=800) | |
y = np.random.uniform(low=40.0, high=120.0, size=(200,)) | |
x = [x for x in range(0, len(y))] # Time (in Seconds) |
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 | |
SWAGGER_REPO="$HOME/workspace/git/swagger-codegen" | |
cd ${SWAGGER_REPO} | |
echo "Working directory: `pwd`" | |
echo "Executing mvn clean ..." | |
mvn -q clean | |
if [ $? -eq 0 ]; then | |
echo "mvn clean successful!" | |
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 | |
# usage: watch.sh <your_command> <sleep_duration> | |
while :; | |
do | |
clear | |
date | |
$1 | |
sleep $2 | |
done |