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/sh | |
# USAGE: | |
# source start | |
venv_folder=".venv" | |
packages=( | |
"pygame==2.5.2" | |
"numpy==1.26.0" |
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
echo trim($str, "\xC2\xA0"); |
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
<% for (var i in htmlWebpackPlugin.files.css) { %> | |
<link href="<%= htmlWebpackPlugin.files.css[i] %>" rel="stylesheet"> | |
<% } %> |
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
require('dotenv').config({ path: path.resolve( __dirname, '../../.env' ) }); | |
module.exports = { | |
... | |
plugins: [ | |
new HtmlWebpackPlugin( { template: './src/index.html' } ), | |
new webpack.DefinePlugin( { |
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 | |
# file: selfsigned.csr.conf | |
# --------------------------- | |
# [req] | |
# default_bits = 2048 | |
# prompt = no | |
# default_md = sha256 | |
# distinguished_name = dn |
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
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \ | |
-keyout selfsigned.key -out selfsigned.crt -extensions san -config \ | |
<(echo "[req]"; | |
echo distinguished_name=req; | |
echo "[san]"; | |
echo subjectAltName=DNS:localhost,DNS:example.net,DNS:www.example.net,IP:10.0.0.1 | |
) \ | |
-subj "/CN=example.com" |
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
$full_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; |
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
$origin = $_SERVER['HTTP_ORIGIN']; | |
$allowed_domains = [ | |
'http://localhost', | |
'http://localhost:8080', | |
'http://localhost:8081', | |
'https://example.com', | |
'https://test.example.com', | |
'http://example.net', | |
]; |
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
set -o allexport; | |
. ./.env; | |
set +o allexport | |
# echo $VAR_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
const WebpackAssetsManifest = require( 'webpack-assets-manifest' ); | |
const manifest = new WebpackAssetsManifest( { | |
transform( assets, manifest ) { | |
assets["version" ] = new Date().getTime().toString(); | |
}, | |
} ); |
NewerOlder