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 | |
# This script: | |
# * installs Trino and Temurin JDK 21 in /home/trino | |
# * configures Trino to listen on port 8080, use it with a reverse proxy like Caddy | |
# * installs a SystemD service to run Trino on server startup | |
set -euo pipefail | |
usage() { |
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 | |
set -euo pipefail | |
usage() { | |
cat <<EOF 1>&2 | |
Usage: $0 [-h] -n <NAME> | |
Generates a Software Bill of Materials (SBOM) for the SEP Docker image | |
-h Display help |
This file has been truncated, but you can view the full file.
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
{ | |
"bomFormat": "CycloneDX", | |
"specVersion": "1.4", | |
"serialNumber": "urn:uuid:70a0f4cc-835c-4fbb-a96f-269b201c7301", | |
"version": 1, | |
"metadata": { | |
"timestamp": "2022-08-08T16:38:35+02:00", | |
"tools": [ | |
{ | |
"vendor": "anchore", |
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 | |
set -euo pipefail | |
usage() { | |
cat <<EOF 1>&2 | |
Usage: $0 [-h] -n <NAME> | |
Generates a Software Bill of Materials (SBOM) for the Trino Docker image | |
-h Display help |
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 | |
set -euo pipefail | |
function ensure_container() { | |
local name=$1 | |
shift | |
local image=$1 | |
shift |
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 | |
/** @link http://stackoverflow.com/questions/2748956/how-would-you-create-a-string-of-all-utf-8-characters */ | |
function unichr($i) | |
{ | |
return iconv('UCS-4LE', 'UTF-8', pack('V', $i)); | |
} | |
$codeunits = array(); | |
for ($i = 0; $i<0xD800; $i++) { |
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 | |
// define benchmarked functions | |
$f1 = function ($string) { | |
for ($i = 0, $count = strlen($string); $i < $count; $i++) { | |
if ($string[$i] === '*') { | |
$string[$i]= mt_rand(0, 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
server { | |
listen 80; | |
server_name site.local; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name site.local; |
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 | |
// define benchmarked functions | |
$f1 = function ($string, $delimiter = ',', $trim = true, $skipEmpty = false) { | |
$result = []; | |
$parts = explode($delimiter, $string); | |
foreach ($parts as $value) { | |
if ($trim) { | |
$value = $trim === true ? trim($value) : (is_callable($trim) ? $trim($value) : trim($value, $trim)); |
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 python | |
""" | |
randwp | |
~~~~~~ | |
Fetches random wallpapers from the wallbase.net toplist and sets it as the | |
background. | |
This script needs Python 3.*. Windows people need to install the `pywin32`_ | |
and Mac OS X people need to install `py-appscript`_. |