Instantly share code, notes, and snippets.

View pytest_mock_api.py
class Api():
def persons(self):
return ['hek2mgl', 'lgm2keh']
class App(Api):
def hello_messages(self):
msg = []
View get_request_uri
function get_request_uri() {
$url = 'http';
if(isset($_SERVER['https']) && $_SERVER['https'] == 'on') {
$url .= 's';
}
$url .= '://';
$url .= $_SERVER['SERVER_NAME'];
View mkalien.sh
#!/bin/bash
if [ $# != 2 ] ; then
echo "usage $0 PATH_TO_BINARY TARGET_FOLDER"
exit 1
fi
PATH_TO_BINARY="$1"
TARGET_FOLDER="$2"