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 | |
# | |
# @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 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 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 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
certbot certonly --manual \ | |
--preferred-challenges=dns \ | |
--email [email protected] \ | |
--server https://acme-v02.api.letsencrypt.org/directory \ | |
--agree-tos \ | |
--manual-public-ip-logging-ok \ | |
-d website.com \ | |
-d *.website.com \ |
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
// Underscore to camelcase | |
function usToCC(str) { | |
return str.replace(/_([a-z])/g, function (g) { return g[1].toUpperCase(); }); | |
} | |
// Camelcase to underscore | |
function ccToUs(str) { | |
return str.replace(/([a-z][A-Z])/g, function (g) { return g[0] + '_' + g[1].toLowerCase() }); | |
} |
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
/** | |
* isNodeEnabled checks to see if the given node is enabled and is in an enabled tab | |
* and/or subflow instance (vs just in the palette); checks it's parents/ancestors. | |
* | |
* @param {object} RED The RED object for accessing nodes. | |
* @param {string} node_id The node ID to check for a valid instance. | |
* @return {boolean} True if the node is a valid enabled instance, false otherwise. | |
*/ | |
function isNodeEnabled(RED, node_id) { |
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
<?php | |
// There is nothing output here because block themes do not use php templates. | |
// There is a core ticket discussing removing this requirement for block themes: | |
// https://core.trac.wordpress.org/ticket/54272. | |
?><!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>"> | |
<title><?php wp_title( '|', true, 'right' ); ?></title> | |
<link rel="stylesheet" href="<?php echo esc_url( get_stylesheet_uri() ); ?>" type="text/css" /> |
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
*.backup | |
.DS_Store |
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
<?php | |
if ( !class_exists( 'DraftCode' ) ) { | |
/** | |
* Our DraftCode class fixes WordPress compatibility issues. | |
*/ | |
class DraftCode | |
{ | |
public function __construct() | |
{ | |
global $wp_filter; |
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 | |
# apt-cyg: install tool for Cygwin similar to debian apt-get | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2013 Trans-code Design | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
NewerOlder