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 | |
| /** | |
| * Deletes the right most string from the found search string | |
| * starting from right to left, including the search string itself. | |
| * | |
| * @return string | |
| */ | |
| function delRightMost( $sSource, $sSearch ) { | |
| for ( $i = strlen( $sSource ); $i >= 0; $i = $i - 1 ) { | |
| $f = strpos( $sSource, $sSearch, $i ); |
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/bash | |
| # | |
| # Copies a source folder to the destination folder via `rsync -a` and | |
| # fixes *absolute* links. Normally rsync only handles *relative* links | |
| # and preserves absolute links. This script searches for the copied | |
| # absolute links in the destination that are pointing to the original | |
| # source folder and updates them to reflect the new destination copy. | |
| # | |
| # Author: Stephen J. Carnam | |
| # Copyright (c) 2023 Virtuosoft / Stephen J. Carnam |
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/bash | |
| # | |
| # @author Stephen J. Carnam | |
| # @license GNU GENERAL PUBLIC LICENSE Version 2 | |
| # @link https://steveorevo.com | |
| # | |
| # Check if a command is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: benchmark <command>" |
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
| connby@connby2:~$ # 1. Ensure rbenv is set to Ruby 2.2.4 | |
| rbenv global 2.2.4 | |
| ruby -v # Verify this outputs "ruby 2.2.4p..." | |
| # 2. Remove all currently installed gems for Ruby 2.2.4 | |
| # This cleans the entire gem environment for this specific Ruby version | |
| rm -rf "/home/connby/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0" | |
| # 3. Also remove any potentially partial bundler executables | |
| rm -f "/home/connby/.rbenv/versions/2.2.4/bin/bundle" |
OlderNewer