Best View in Codepen Fullscreen
A Pen by Donald Steele on CodePen.
| #!/bin/sh | |
| TMPFILE="/tmp/xtrabackup-runner.$$.tmp" | |
| USEROPTIONS="--user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST}" | |
| BACKDIR=/srv/mysql-bak | |
| BASEBACKDIR=$BACKDIR/base | |
| INCRBACKDIR=$BACKDIR/incr | |
| FULLBACKUPCYCLE=604800 # Create a new full backup every X seconds | |
| KEEP=1 # Number of additional backups cycles a backup should kept for. | |
| START=`date +%s` |
| echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list | |
| wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add - | |
| apt update | |
| apt install -y php8.0 php8.0-fpm | |
| apt install -y php8.0 php8.0-fpm php8.0-cli php8.0-common php8.0-fpm php8.0-bcmath php8.0-mbstring php8.0-xml php8.0-curl php8.0-zip php8.0-gd php8.0-redis php8.0-mysql php8.0-imagick php8.0-tidy php8.0-xmlrpc php8.0-intl |
| <?php | |
| define('FILE_ENCRYPTION_BLOCKS', 10000); | |
| /** | |
| * @param $source Path of the unencrypted file | |
| * @param $dest Path of the encrypted file to created | |
| * @param $key Encryption key | |
| */ | |
| function encryptFile($source, $dest, $key) |
| #define _GNU_SOURCE | |
| #include <errno.h> | |
| #include <sched.h> | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/mount.h> | |
| #include <sys/stat.h> | |
| #include <sys/syscall.h> | |
| #include <sys/types.h> |
| <?php | |
| $url = "http://scoreboard.uscyberpatriot.org/"; | |
| $ch = curl_init(); | |
| $timeout = 5; | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); | |
| $html = curl_exec($ch); | |
| curl_close($ch); |
| .glass{ | |
| background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); | |
| background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0))); | |
| background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); | |
| background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); | |
| background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); | |
| background: linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); | |
| border: 2px solid #DDDBD7; | |
| -webkit-box-shadow: 3px 3px 10px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255, 0.8); | |
| -moz-box-shadow: 3px 3px 10px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255, 0.8); |
Best View in Codepen Fullscreen
A Pen by Donald Steele on CodePen.
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: don | |
| * Date: 2/22/2019 | |
| * Time: 10:11 AM | |
| * Scan a directory and encode the media using scene 2016 standards | |
| * this will ouput a bash script (could be modified at line 27 to exec instead of echo to execute | |
| * | |
| * Usage:: |
| #!/bin/bash | |
| #requires imagemagik, inkscape and pngquant | |
| #sizes you wish to create | |
| size=(16 32 24 48 72 96 144 152 192 196 256) | |
| for file in *.svg; do | |
| base=${file%.*} | |
| for i in ${size[@]}; do | |
| inkscape $file --export-png="${base}_${i}.png" -w$i -h$i --without-gui |
| #!/bin/sh | |
| BASEFOLDER=/home/vbox/backups | |
| for VMNAME in $(VBoxManage list runningvms | cut -d ' ' -f1 | sed 's/"//g;') | |
| do | |
| echo "" | |
| VBoxManage controlvm "$VMNAME" acpipowerbutton | |
| echo "Waiting for VM "$VMNAME" to poweroff..." | |
| until $(VBoxManage showvminfo --machinereadable "$VMNAME" | grep -q ^VMState=.poweroff.) |