$ docker
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
MYSQL_ROOT_PASSWORD=rootpass |
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
<section class="slider-advisory"> | |
<div class="container p-0"> | |
@php | |
$wp_query = new WP_Query( | |
array( | |
'post_type' => 'advisory', | |
'post_status' => 'publish', | |
'posts_per_page' => -1 | |
) | |
); |
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 | |
/* 1. add function to rest_api_init hook, */ | |
/* 2. then, call register_rest_route() function */ | |
add_action( 'rest_api_init', 'define_endpoint'); | |
function define_endpoint(){ | |
register_rest_route( 'namespace', '/new/route', array( | |
'methods' => array('POST','GET','UPDATE','DELETE'), | |
'callback' => 'my_awesome_func' | |
) ); | |
} |
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 | |
sudo add-apt-repository -y ppa:ondrej/php | |
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - | |
sudo apt update | |
sudo apt install -y mysql-server mysql-client nginx redis-server nodejs pkg-config sqlite3 git curl postgresql-client mercurial zip bash-completion xvfb gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable imagemagick x11-apps \ | |
sudo apt-get install -y \ |
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
REGISTRY_URI=registry.example.com | |
APPLICATION_DOCKER_FROM_IMAGE=ubuntu:18.04 | |
APPLICATION_PHP_VERSION=7.2 | |
APPLICATION_CODE=some-thing | |
APPLICATION_NAME=Some\ Thing | |
APPLICATION_DESCRIPTION=Some\ Thing\ Else | |
APPLICATION_VENDOR_NAME=Your\ Name | |
DATA_DIR=../some-thing-data | |
# Dev only. |
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
#fix 504 gateway timeouts, can go in nginx.conf | |
proxy_connect_timeout 600; | |
proxy_send_timeout 600; | |
proxy_read_timeout 600; | |
send_timeout 600; | |
#set the location of the cached files, zone, name, size (100 MB) and how long to cache for 600 minutes | |
proxy_cache_path /var/run/proxy-cache levels=1:2 keys_zone=WORDPRESS:10m max_size=100m | |
inactive=600m; | |
proxy_cache_key $scheme$host$request_uri; |
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
version: '3' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
labels: | |
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" | |
container_name: nginx-proxy | |
restart: unless-stopped | |
ports: |
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 | |
//Automatically login a single WordPress user upon arrival to a specific page. | |
//Redirect to home page once logged in and prevent viewing of the login page. | |
//Tested with WP 3.9.1. Used in functions.php | |
//Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead." | |
//From http://tourkick.com/2014/wordpress-demo-multisite-db-reset/ | |
function auto_login() { | |
//change these 2 items | |
$loginpageid = '1234'; //Page ID of your login page |
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
version: "3" | |
services: | |
sonarqube: | |
image: sonarqube | |
expose: | |
- 9000 | |
ports: | |
- "127.0.0.1:9000:9000" | |
networks: |