Skip to content

Instantly share code, notes, and snippets.

View josephworks's full-sized avatar
😀
Yes!! It is happening!

josephworks

😀
Yes!! It is happening!
View GitHub Profile
sudo chown www-data:www-data -R * # Let Apache be owner
sudo find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x
sudo find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r--
# iLO Command to invoke iLO console
# Usage: ilo.ps1 username@ip-addr <iLO password> <iLO console port (optional)>
# Example: ilo.ps1 admin@192.168.1.100
# Copyright (c) 2023, Joseph Robinson
param(
[Parameter(Mandatory=$true,Position=0)]
[string]$connectionStringParam,
[Parameter(Mandatory=$true,Position=1)]
#!/bin/bash
# update all containers
# list of container ids we need to iterate through
containers=$(pct list | tail -n +2 | cut -f1 -d' ')
function update_container() {
container=$1
echo "[Info] Updating $container"
# to chain commands within one exec we will need to wrap them in bash
echo "Stopping Nexus"
service nexus stop
echo "Getting Latest Nexus Version"
VERSION=$(basename "$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/sonatype/nexus-public/releases/latest)")
VERSION="${VERSION:8}"
echo $VERSION
echo "Downloading Update"
wget https://download.sonatype.com/nexus/3/nexus-"$VERSION"-linux-x86_64.tar.gz -O latest-unix.tar.gz
echo "Extracting Update"
tar -zxvf latest-unix.tar.gz
@josephworks
josephworks / Dism++.script
Created January 27, 2024 09:49
Dism++ Script for PhoenixPE
[License]
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// This script is part of the PhoenixPE project and distributed under the MIT License.
//
// Additional 3rd party tools, encoded files, and programs used by the project are the property
// of their respective authors and may be subject to their own license agreement.
//
// Copyright (c) 2024 JosephWorks
//
$Today = (Get-Date).DateTime
$javaversion = (java -version) -join "`n";
$intentversion = "java version ""1.8.0_231""`r`nJava(TM) SE Runtime Environment (build 1.8.0_231-b11)`r`nJava HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)"
$adoptversion = "openjdk version ""1.8.0_252""`r`nOpenJDK Runtime Environment (build 1.8.0_252-b09)`r`nEclipse OpenJ9 VM (build openj9-0.20.0, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200416_608 (JIT enabled, AOT enabled)`r`nOpenJ9 - 05fa2d361`r`nOMR - d4365f371`r`nJCL - cfa47e66cd5 based on jdk8u252-b09)"
#clear
function Write-ColorOutput($ForegroundColor) {
# save the current color
$fc = $host.UI.RawUI.ForegroundColor
@josephworks
josephworks / index.html
Created October 14, 2019 18:50
particles.js demo
<!-- particles.js container --> <div id="particles-js"></div> <!-- stats - count particles --> <div class="count-particles"> <span class="js-count-particles">--</span> particles </div> <!-- particles.js lib - https://github.com/VincentGarreau/particles.js --> <script src="http://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script> <!-- stats.js lib --> <script src="http://threejs.org/examples/js/libs/stats.min.js"></script>
zenity --info --text="Hello World!"
notify-send "Hello World!"
dialog --title "Delete file" \
--backtitle "Linux Shell Script Tutorial Example" \
--yesno "Are you sure you want to permanently delete \"/tmp/foo.txt\"?" 7 60
# Get exit status
# 0 means user hit [yes] button.
# 1 means user hit [no] button.
#!/bin/bash
# Get domain name
_zenity="/usr/bin/zenity"
_out="/tmp/whois.output.$$"
domain=$(${_zenity} --title "Enter domain" \
--entry --text "Enter the domain you would like to see whois info" )
if [ $? -eq 0 ]
then
# Display a progress dialog while searching whois database
#!/bin/bash
# clear the screen
tput clear
# Move cursor to screen location X,Y (top left is 0,0)
tput cup 3 15
# Set a foreground colour using ANSI escape
tput setaf 3