Skip to content

Instantly share code, notes, and snippets.

View efann's full-sized avatar

Eddie Fann efann

View GitHub Profile
@efann
efann / derby.sh
Created October 14, 2014 21:27
Apache Derby Server Startup Script
#!/bin/sh
#
# Startup script for Derby, the database server
#
# chkconfig: 345 90 10
# description: Derby is the database server
# processname: derby
# pidfile: /var/run/derby.pid
if [ -z "$DERBY_USER" ]; then
#!/bin/bash
# Updated on August 14, 2017
# If not exactly 3 arguments. . . .
if [ ! $# == 3 ]
then
echo -e "\nOne must pass the Drupal folder name under /var/www, the new subtheme machine name and new subtheme title.\n\n"
echo -e "For example, $0 Fred.com adminimal_child 'Adminimal Child'\n\n"
echo -e "Exiting. . . .\n\n"
#!/bin/bash
# Updated on August 7, 2019
# If not exactly 3 arguments. . . .
if [ ! $# == 3 ]
then
echo -e "\nOne must pass the Drupal folder name under /var/www, the new subtheme machine name and new subtheme title.\n\n"
echo -e "For example, $0 Fred.com bstrap_child 'BStrap Child'\n\n"
echo -e "Exiting. . . .\n\n"
@efann
efann / touch.ps1
Last active January 21, 2021 00:17
Emulates Linux touch for Windows
[CmdletBinding()]
param(
[Parameter(position=0, Mandatory=$true)]
[String]$lcFolder
)
$lcDate = Get-date -Format MM/dd/yyyy" "HH:mm:ss
echo "Setting timestamp for $lcFolder"
$loFiles = Get-ChildItem -recurse "$lcFolder"
#!/bin/bash
# License: Eclipse Public License - v 2.0 (https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html)
# Updated on November 7, 2022
if [[ $EUID -ne 0 ]]; then
echo -e "\nThis script must be run as root. Exiting. . . .\n\n"
exit 1
fi
@efann
efann / change-java-version.sh
Last active November 7, 2022 20:55
change-java-version.sh
#!/bin/bash
# License: Eclipse Public License - v 2.0 (https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html)
# Updated on November 7, 2022
if [[ "$EUID" -ne 0 ]]
then
echo -e "\nThis script must be run as root. Exiting. . . .\n\n"
exit 1
fi
@efann
efann / cms-refresh.sh
Last active November 7, 2022 20:56
Run updates for all WordPress and Drupal sites under /var/www
#!/bin/bash
# License: Eclipse Public License - v 2.0 (https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html)
# Updated on November 7, 2022
if [[ $EUID -eq 0 ]]
then
echo -e "\nThis script may not be run as root. Exiting. . . .\n\n"
exit 1
fi
#!/bin/bash
# License: Eclipse Public License - v 2.0 (https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html)
# Updated on November 7, 2022
if [ -z "$1" ]
then
echo -e "\nOne must pass the folder name under /var/www to be set. Exiting. . . .\n\n"
exit 1
fi
@efann
efann / backup.py
Last active November 7, 2022 20:57
# License: Eclipse Public License - v 2.0 (https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html)
# Updated on November 7, 2022
#
# Python routine for copying a complete directory structure up to Dropbox.
# Uses Python SDK for API v2
# https://www.dropbox.com/developers/documentation/python
import dropbox
import os
#!/bin/bash
# License: Eclipse Public License - v 2.0 (https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html)
# Updated on November 7, 2022
#------------------------------------------------------------------------------
function backupFolder
{
lcRootBackup="$1"
lcSource="$2"