I'm using Homebrew to stop the service
brew services stop mysql
| if (isset($_GET['doing_wp_cron'])) { | |
| remove_action('do_pings', 'do_all_pings'); | |
| wp_clear_scheduled_hook('do_pings'); | |
| } |
| files: | |
| "/opt/elasticbeanstalk/support/conf/sidekiq.conf": | |
| mode: "000755" | |
| content: | | |
| description "Elastic Beanstalk Sidekiq Upstart Manager" | |
| start on runlevel [2345] | |
| stop on runlevel [06] | |
| # explained above | |
| respawn | |
| respawn limit 2 30 |
| # Recursively optimize PNG and JPEG images using convert command | |
| # | |
| # `convert` is part of ImageMagick (http://www.imagemagick.org/). You will need to install it first. | |
| # | |
| # Author: Rajendra Kumar Bhochalya (http://rkb.io) | |
| # | |
| # @see https://developers.google.com/speed/docs/insights/OptimizeImages | |
| # Optimize all JPEG images in current directory and subdirectories | |
| find . -name "*.jpg" -exec convert "{}" -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB "{}" \; -exec echo "{}" \; |
| <?php | |
| /** | |
| This Scheduler will run once every minute unlike the Heroku scheduler which only runs every 10 mintues. | |
| To use this scheduler with Laravel 5.4+ add this file to /app/Console/Commands/RunScheduler.php | |
| Register this file in app/Console/Kernel.php |
| # The initial version | |
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi | |
| # My favorite from the comments. Thanks @richarddewit & others! | |
| set -a && source .env && set +a |
| FROM alpine | |
| RUN apk add --update --no-cache nodejs | |
| RUN npm i -g yarn | |
| ADD package.json yarn.lock /tmp/ | |
| ADD .yarn-cache.tgz / | |
| RUN cd /tmp && yarn | |
| RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules |
| # first we download the list of IP ranges from CloudFlare | |
| wget https://www.cloudflare.com/ips-v4 | |
| # set the security group ID | |
| SG_ID="sg-00000000000000" | |
| # iterate over the IP ranges in the downloaded file | |
| # and allow access to ports 80 and 443 | |
| while read p | |
| do |
| // Remove Meta Generator: <meta name="generator" content="WordPress x.x" /> | |
| // and <meta name="generator" content="WooCommerce x.x.x" /> | |
| remove_action('wp_head', 'wp_generator'); | |
| // Remove the EditURI/RSD | |
| // Like: <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://localhost/wp/xmlrpc.php?rsd" /> | |
| remove_action ('wp_head', 'rsd_link'); | |
| // Remove it if you don't know what is Windows Live Writer | |
| // <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://localhost/wp/wp-includes/wlwmanifest.xml" /> |
| brew install apple-gcc42 openssl libyaml libffi | |
| xcode-select --install | |
| export CC=/usr/local/bin/gcc-4.2 | |
| export CFLAGS='-g -O2' | |
| export RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
| export CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
| rbenv install 1.8.7-p375 |