A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
| some helpful instructions when I have to change my laptop | |
| clone solr 4 image from https://github.com/fhdalikhan/docker-solr4 | |
| on windows don't use git bash, use windows terminal with ubuntu using WSL 2, otherwise will get erros due to line endings being CRLF, which should be LF instead. | |
| build using: | |
| docker build -t solr4 . | |
| run using: |
A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; | |
| use Illuminate\Support\Facades\Gate; | |
| class AuthServiceProvider extends ServiceProvider | |
| { | |
| /** |
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
| [Install] | |
| WantedBy=multi-user.target | |
| [Unit] | |
| Description=Google Cloud Compute Engine SQL Proxy | |
| Requires=networking.service | |
| After=networking.service | |
| [Service] | |
| Type=simple |
| var states = [ | |
| { | |
| label: 'Alabama', | |
| value: 'AL' | |
| }, | |
| { | |
| label: 'Alaska', | |
| value: 'AK' | |
| }, | |
| { |
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.
| # 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. |
| With argument | |
| "C:\Program Files\Git\git-bash.exe" "--cd=%1" | |
| Direct | |
| "C:\Program Files\Git\git-bash.exe" "--cd="C:\YOUR\FOLDER\" |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Aloha!</title> | |
| <style type="text/css"> | |
| * { | |
| font-family: Verdana, Arial, sans-serif; | |
| } |