' app = search("aws_opsworks_app").first Chef::Log.info("********** The app's short name is '#{app['shortname']}' ") Chef::Log.info(" The app's URL is '#{app['app_source']['url']}' **********") '
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
apt-get update | |
apt-get install -y ruby | |
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/releases/codedeploy-agent_1.0-1.1597_all.deb | |
mkdir codedeploy-agent_1.0-1.1597_ubuntu20 | |
dpkg-deb -R codedeploy-agent_1.0-1.1597_all.deb codedeploy-agent_1.0-1.1597_ubuntu20 | |
sed 's/2.0/2.7/' -i ./codedeploy-agent_1.0-1.1597_ubuntu20/DEBIAN/control | |
dpkg-deb -b codedeploy-agent_1.0-1.1597_ubuntu20 | |
dpkg -i codedeploy-agent_1.0-1.1597_ubuntu20.deb | |
systemctl start codedeploy-agent | |
systemctl enable codedeploy-agent |
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
commands: | |
create_pre_dir: | |
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/pre" | |
ignoreErrors: true | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/00_setup_swap.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | |
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
version: "3" | |
services: | |
traefik: | |
image: "traefik:v2.0" | |
container_name: "traefik" | |
command: | |
# Globals | |
- "--log.level=DEBUG" | |
- "--api=true" |
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
//use this code into your functions.php file. | |
function bb_sender_email( $original_email_address ) { | |
return '[email protected]'; | |
} | |
// Function to change sender name | |
function bb_sender_name( $original_email_from ) { | |
return 'Your Name'; | |
} |
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 | |
# | |
# Script to create MySQL db + user | |
# | |
# @author Raj KB <[email protected]> | |
# @website http://www.magepsycho.com | |
# @version 0.1.0 | |
# Usage chmod +x ./mysql-create-db-user.sh | |
# ./mysql-create-db-user.sh --host=localhost --database=test-db --user=test-user |
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
UPDATE tblhosting SET server='2' WHERE server='1'; |
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
function string_limit_words($string, $word_limit) | |
{ | |
$words = explode(' ', $string, ($word_limit + 1)); | |
if(count($words) > $word_limit) | |
array_pop($words); | |
return implode(' ', $words); | |
} | |
function hook_some_content_into_content_product_page(){ |
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 | |
/** Sets up 'direct' method for WordPress to FTP, without requiring credentials */ | |
define('FS_METHOD', 'direct'); | |
/** Defines permissions for WordPress to apply to new directories */ | |
define('FS_CHMOD_DIR', ( 0755 & ~ umask() ) ); | |
/** Defines permissions for WordPress to apply to new files */ | |
define('FS_CHMOD_FILE', ( 0664 & ~ umask() ) ); |
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 | |
/** | |
* Hide free shipping if others methods exists. | |
* | |
* @param array $available_methods | |
*/ | |
function custom_shipping_rules( $available_methods ) { | |
if ( isset( $available_methods['PAC'] ) || isset( $available_methods['SEDEX'] ) ) { | |
unset( $available_methods['free_shipping'] ); |
NewerOlder