See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.jsonfile in/etc/docker:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json file in /etc/docker:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| # all logging settins are here on top | |
| $logFile = "log-$(gc env:computername).log" | |
| $logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL") | |
| $logSize = 1mb # 30kb | |
| $logCount = 10 | |
| # end of settings | |
| function Write-Log-Line ($line) { | |
| Add-Content $logFile -Value $Line | |
| Write-Host $Line |
| #!/usr/bin/env powershell | |
| # This script can keep the computer awake while executing another executable, or | |
| # if no executable was passed in, then it stays awake until this script stops. | |
| # There are 3 different ways of staying awake: | |
| # Away Mode - Enable away mode (https://blogs.msdn.microsoft.com/david_fleischman/2005/10/21/what-does-away-mode-do-anyway/) | |
| # Display Mode - Keep the display on and don't go to sleep or hibernation | |
| # System Mode - Don't go to sleep or hibernation | |
| # The default mode is the System Mode. | |
| # Away mode is only available when away mode is enabled in the advanced power options. |
| #Put this in Export-Chocolatey.ps1 file and run it: | |
| #.\Export-Chocolatey.ps1 > packages.config | |
| #You can install the packages using | |
| #choco install packages.config -y | |
| Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>" | |
| Write-Output "<packages>" | |
| choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" } | |
| Write-Output "</packages>" |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| # | |
| # Name: nginx-tls.conf | |
| # Auth: Gavin Lloyd <gavinhungry@gmail.com> | |
| # Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
| # | |
| # Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related | |
| # to SSL/TLS are not included here. | |
| # | |
| # Additional tips: | |
| # |
| #!/bin/bash | |
| function remove_dir () { | |
| rm -rf "$1_" | |
| if [ -d "$1" ] | |
| then | |
| mv "$1" "$1_" | |
| fi | |
| } |
| private function addDistortionTo(target:DisplayObject):void | |
| { | |
| var offset:Number = 0; | |
| var scale:Number = Starling.contentScaleFactor; | |
| var width:int = target.width; | |
| var height:int = target.height; | |
| var perlinData:BitmapData = new BitmapData(width * scale, height * scale, false); | |
| perlinData.perlinNoise(200*scale, 20*scale, 2, 5, true, true, 0, true); | |