brew services stop php
brew services stop mysql
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 | |
/** | |
* Copyright © Magento, Inc. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ | |
use Magento\Framework\App\Bootstrap; | |
use Magento\Framework\DB\Adapter\AdapterInterface; | |
use Magento\Framework\DB\Query\Generator; | |
use Magento\Framework\DB\Select\QueryModifierFactory; |
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
SET @utc_offset = 6; | |
-- Orders Per Year -- | |
SELECT period_date, CONCAT("UTC-", @utc_offset) AS utc_offset, order_count, gross_revenue, ROUND(gross_revenue / order_count, 2) AS gross_aov | |
FROM ( | |
SELECT | |
COUNT(*) AS order_count, | |
ROUND(SUM(base_grand_total), 2) AS gross_revenue, | |
date_format(date_sub(o.created_at, INTERVAL @utc_offset HOUR), "%Y") AS period_date | |
FROM sales_order o |
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 | |
SOURCE_DB_NAME="example_prod" | |
SOURCE_ROOT_DIR="/var/www/prod" | |
SOURCE_DUMP_FILENAME=example_prod_$(date +%F).sql.gz | |
TARGET_DB_NAME="example_stage" | |
TARGET_ROOT_DIR="/var/www/stage" | |
TARGET_SSH_USER="www-stage" | |
TARGET_SSH_HOST="stage.example.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
[Install] | |
WantedBy=multi-user.target | |
[Unit] | |
Description=Google Cloud Compute Engine SQL Proxy | |
Requires=networking.service | |
After=networking.service | |
[Service] | |
Type=simple |
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
# Poll for various system stats for monitoring system | |
# Just copy and paste the commands into a bash prompt | |
# Use Ctrl-C to exit the polling | |
# Simple Example (CPU/Load/Memory) | |
# Settings | |
INTERVAL_DURATION="5" # seconds to average across | |
TIME_PAD=' ' |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
Currently concourse does not support moving pipelines between teams via fly CLI. There is an issue for that here
The only way to do this is to make a few changes in the DB.
If you run the statement below you will see that 6 tables have the team_id
column.
concourse=> select table_name from INFORMATION_SCHEMA.COLUMNS
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
# List the composer home directory | |
# Typically /Users/<user>/.composer or /home/<user>/.composer or C:\Users\<user>\AppData\Roaming\Composer | |
echo $COMPOSER_HOME | |
# List files in the composer home | |
ls -la $COMPOSER_HOME | |
# View auth.json in composer home used when no local ./auth.json exists in the directory executed from | |
cat $COMPOSER_HOME/auth.json |
NewerOlder