project-folder/
.git
wp-admin/
wp-content/
wp-includes/
.htaccess
<?php | |
// Display erros if any on the page. | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
session_start(); | |
if(isset($_GET['action']) and $_GET['action'] == 'logout'){ | |
unset($_SESSION['accessToken']); |
function listAllFiles($driveService){ | |
$parameters = array( | |
'maxResults' => '100' | |
); | |
$results = $driveService->files->listFiles($parameters); | |
echo '<table>'; |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Aloha!</title> | |
<style type="text/css"> | |
* { | |
font-family: Verdana, Arial, sans-serif; | |
} |
With argument | |
"C:\Program Files\Git\git-bash.exe" "--cd=%1" | |
Direct | |
"C:\Program Files\Git\git-bash.exe" "--cd="C:\YOUR\FOLDER\" |
# wp-secure.conf | |
# | |
# | |
# This file includes common security considerations for wordpress using nginx. | |
# | |
# The goal is to block actions which are usually dangerous to wordpress. | |
# Additionally, we block direct access to PHP files and folders which should not | |
# be accessed directly from a browser. | |
# | |
# Also have included exceptions for plugins that are known to require this access. |
This is a simple way of importing MySQL database in Docker.
In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.
Put the exported sql file in the shared folder.
Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash
.
Login to MySQL via mysql -u USERNAME -p
.
var states = [ | |
{ | |
label: 'Alabama', | |
value: 'AL' | |
}, | |
{ | |
label: 'Alaska', | |
value: 'AK' | |
}, | |
{ |
[Install] | |
WantedBy=multi-user.target | |
[Unit] | |
Description=Google Cloud Compute Engine SQL Proxy | |
Requires=networking.service | |
After=networking.service | |
[Service] | |
Type=simple |
Being new to training ML models using Google Cloud VM instances, I faced issues where my ssh connection to the cloud instance (using either the clound web-based ssh client or using cloud shell) would disconnect from time to time (for example when I power off my laptop or the network gets disconnected) which would terminate the model training process. Therefore I searched for a ssh client that can handle disconnection and can resume connection without disrupting the process running on the server and came across with Mosh mobile shell, a remote terminal app that supports roaming.
It took me a while to figure out how to set up a third party ssh terminal using the google cloud OAuth. Here's a step-by-step guide:
Since this writing, another Mosh user kindly advised me that using terminal multiplexer co