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
def package_local_targets(input_dir, output_dir): | |
trace = 'package_local_targets' | |
os.chdir(input_dir) | |
try: | |
print(f"{trace}: create directory {output_dir}") | |
os.makedirs(output_dir) | |
except FileExistsError: | |
print(f"delete existing {output_dir}") | |
shutil.rmtree(output_dir) |
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 | |
## THIS IS THE OLD WAY | |
## Nowadays, simply follow the Compose installation instructions in the official documentation: | |
## https://docs.docker.com/compose/install/ | |
# get latest docker compose released tag | |
COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4) |
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 | |
# Authorize to GitHub to get the latest release tar.gz | |
# Requires: oauth token, https://help.github.com/articles/creating-an-access-token-for-command-line-use/ | |
# Requires: jq package to parse json | |
# Your oauth token goes here, see link above | |
OAUTH_TOKEN="34k234lk234lk2j3lk4j2l3k4j2kj3lk" | |
# Repo owner (user id) | |
OWNER="your-user-name" |
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
<? | |
function aes128Encrypt($key, $data) { | |
if(16 !== strlen($key)) $key = hash('MD5', $key, true); | |
$padding = 16 - (strlen($data) % 16); | |
$data .= str_repeat(chr($padding), $padding); | |
return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, str_repeat("\0", 16))); | |
} | |
function aes128Decrypt($key, $data) { |