This file contains hidden or 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
# Define static ip value from STATIC_IP environmental variable | |
#/bin/bash | |
IF [[ -z $STATIC_IP ]]; THEN | |
echo "STATIC_IP enviroment variable not found, please define it and rerun script" | |
ELSE | |
cat <<EOF > /etc/netplan/60-floating.yaml | |
network: | |
version: 2 | |
renderer: networkd | |
ethernets: |
This file contains hidden or 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 -e | |
showhelp() { | |
echo "[?] Usage: $0 --dir <PATH> [--data <PATH> --to-repo]" | |
echo "----------------------------------------------" | |
echo -e "[+]\t--dir: R package folder" | |
echo -e "[+]\t--data: Model data folder" | |
echo -e "[+]\t--to-repo: Publish to remote repository (curl -X PUT)" | |
echo -e "[+]\t--remove: Remove package before installation" |
This file contains hidden or 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 | |
/* Constants definition, modify as needed | |
- TARGET_FORM: (int) form id to be validated | |
- MAX_ENTRIES_COUNT: (int) max value for the entries counted at database | |
- DATE_LABEL: (string) name of the input datepicker from the form | |
- NUMBERS_LABELS: (string[]) names of the numeric inputs from the form | |
*/ | |
const TARGET_FORM = 1855; | |
const MAX_ENTRIES_COUNT = 39; |
This file contains hidden or 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
#cloud-config | |
packages: | |
- nginx | |
- certboot | |
- fail2ban | |
- ufw | |
package_update: true | |
package_upgrade: true | |
runcmd: | |
- printf "[sshd]\nenabled = true\nbanaction = iptables-multiport" > /etc/fail2ban/jail.local |
This file contains hidden or 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
// Javascript functions to allow html tables to be downloaded as CSV | |
// Thanks to CodexWorld for the functions code | |
// https://www.codexworld.com/export-html-table-data-to-csv-using-javascript/ | |
function downloadCSV(csv, filename) { | |
var csvFile; | |
var downloadLink; | |
// CSV file | |
csvFile = new Blob([csv], {type: 'text/csv'}); |
This file contains hidden or 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 | |
## find working path | |
commit_path=$(realpath .) | |
echo "GITUP commit at ${commit_path}" | |
if [[ -z $1 ]]; then | |
echo "Creating UP commit" | |
msg="UP" | |
else |
This file contains hidden or 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 | |
# -- IMPORTANT LINKS -- | |
# https://wiki.debian.org/wl | |
# https://wiki.debian.org/wl#supported | |
# https://wiki.debian.org/bcm43xx | |
# https://wiki.debian.org/WiFi/HowToUse | |
# https://askubuntu.com/questions/235279/my-wifi-adapter-is-not-working-at-all-how-to-troubleshoot | |
# https://www.linux.org/threads/no-wifi-adapter-found.22187/ | |
# https://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers/60395#60395 |
This file contains hidden or 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 | |
## Visit official page at: | |
## https://github.com/tylermorganwall/rayshader | |
## https://www.tylermw.com/3d-ggplots-with-rayshader/ | |
## system dependencies | |
aptitude -y install mesa-utils libglu1-mesa-dev \ | |
freeglut3-dev mesa-common-dev libglew-dev libglfw3-dev libglm-dev \ | |
libao-dev libmpg123-dev gir1.2-freetype2-2.0 libfreetype-dev \ |
This file contains hidden or 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 | |
## Unicode values recovered from | |
# https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode | |
echo -e "\U1d505\U1d532\U1d52f\U1d524\U1d522\U1d52c\U1d52b" | |
This file contains hidden or 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 | |
set -e | |
apt update && apt install -y \ | |
r-base \ | |
r-cran-devtools \ | |
r-cran-rmarkdown \ | |
r-cran-rcpp \ | |
texinfo \ |
NewerOlder