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 | |
# Update package list | |
sudo apt update | |
# Install PHP and required extensions | |
sudo apt install -y php php-cli php-fpm php-json php-common php-zip php-gd php-mbstring php-curl php-xml php-bcmath | |
# Install Composer | |
curl -sS https://getcomposer.org/installer | php |
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 -x | |
if [ -n "$SUDO_USER" ]; then | |
echo "Hello $SUDO_USER!!" | |
elif [ "$EUID" -eq 0 ]; then | |
echo "This script should NOT be run as root, please run it as a regular user with sudo." | |
exit 1 | |
else | |
echo "Please run as a regular user with sudo." |
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 | |
# script originally from https://tailscale.com/blog/steam-deck/ 11/16/2023 | |
set -euo pipefail | |
dir="$(mktemp -d)" | |
pushd . | |
cd "${dir}" | |
tarball="$(curl 'https://pkgs.tailscale.com/stable/?mode=json' | jq -r .Tarballs.amd64)" | |
version="$(echo ${tarball} | cut -d_ -f2)" |
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-conf bash thing | |
# for setting a configuration setting in a file defaulting with a : colon assignment | |
# and adds the setting if it doesn't find it. | |
# | |
#setconf <filepath&name> "string" "<setting>" [-y] | |
#i.e. setconf.sh /etc/datadog/datadog.yaml "api_key" "your_api_key_here" -y | |
# Color and formatting definitions | |
RED='\033[0;31m' |
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
[username] | |
style_user = 'white bold' | |
style_root = 'black bold' | |
format = 'u: [$user]($style) ' | |
disabled = false |
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
#kiosk display timeout | |
$user = "Kiosk" | |
$Parm2change = "kiosk-idle-timeout-minutes" | |
$Parm2changeNewValue ="5" | |
$Sid = (Get-LocalUser -Name $user).SID.Value | |
#this part not really relevant - but interesting to return to compare | |
$version = (Get-ComputerInfo | Select-Object OsBuildNumber).OsBuildNumber |
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 | |
#TODO: check user is NOT root or sudo | |
set -e | |
if [ -d ~/.local/share/JetBrains/Toolbox ]; then | |
echo "It appears that JetBrains Toolbox is already installed! Starting..." | |
if [ ! -e /usr/local/bin/jetbrains-toolbox ]; then | |
sudo ln -s ~/.local/share/JetBrains/Toolbox/bin/jetbrains-toolbox /usr/local/bin/jetbrains-toolbox |
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 | |
# used to install offical chrome and selenium on Ubuntu 16.04.1 LTS, 18.04, 20.04.1 LTS desktop, Jan 2021 | |
# also tested and works on Elem OS 5.1 :) | |
# | |
# make sure script is run as root or sudo | |
if [[ $(whoami) != "root" ]] ; then | |
echo ; echo "This script, $0, SHOULD be run as ROOT. " ; echo | |
exit 1 | |
fi | |
# |
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
<html> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.0/themes/prism.min.css"> | |
</head> | |
<body> | |
<pre> | |
<?php var_dump($_POST); | |
$xx = count($_POST); |
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 | |
#usage: mysql-drop-all-tables -d database -u dbuser -p dbpass | |
TEMP_FILE_PATH='./drop_all_tables.sql' | |
while getopts d:u:p: option | |
do | |
case "${option}" | |
in |
NewerOlder