This is a question that comes up quite often by windows users, so thought we would share how we normally do it. The question is
Can you run a PostgreSQL server on your windows desktop/server box without having to install anything?
The answer is
| # https://github.com/microsoft/WSL/issues/4699#issuecomment-627133168 | |
| # | |
| wsl --shutdown | |
| diskpart | |
| # open window Diskpart | |
| select vdisk file="C:\WSL-Distros\…\ext4.vhdx" | |
| attach vdisk readonly | |
| compact vdisk | |
| detach vdisk |
| # https://medium.com/geekculture/run-docker-in-windows-10-11-wsl-without-docker-desktop-a2a7eb90556d | |
| # | |
| sudo visudo | |
| # Docker daemon specification | |
| asdf ALL=(ALL) NOPASSWD: /usr/bin/dockerd | |
| echo '# Start Docker daemon automatically when logging in if not running.' >> ~/.bashrc | |
| echo 'RUNNING=`ps aux | grep dockerd | grep -v grep`' >> ~/.bashrc |
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Launch", | |
| "type": "go", | |
| "request": "launch", |
| #!/bin/bash | |
| # Author: Maxwel Leite | |
| # Website: http://needforbits.wordpress.com/ | |
| # Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros | |
| # Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007. | |
| # These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas. | |
| # Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today. | |
| # Dependencies: wget, fontforge and cabextract | |
| # Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download | |
| # Tested: Ubuntu Saucy/Trusty/Xenial/Bionic |
| sudo apt install build-essential linux-headers-amd64 | |
| cd Downloads/ #or wherever the .run file was put | |
| sudo chmod +x VirtualBox*.run #previously downloaded from Oracle --> "For all distributions" so does not depend on the problematic libs | |
| sudo ./VirtualBox*.run | |
| vboxversion=$(wget -qO - https://download.virtualbox.org/virtualbox/LATEST.TXT) | |
| wget "https://download.virtualbox.org/virtualbox/${vboxversion}/Oracle_VM_VirtualBox_Extension_Pack-${vboxversion}.vbox-extpack" | |
| sudo vboxmanage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-${vboxversion}.vbox-extpack | |
| sudo usermod -aG vboxusers [username] |
| { | |
| "require": { | |
| "sunra/php-simple-html-dom-parser": "1.5" | |
| } | |
| } |
| <?php | |
| /* | |
| +----------------------------------------------------------------------+ | |
| | APC | | |
| +----------------------------------------------------------------------+ | |
| | Copyright (c) 2006-2011 The PHP Group | | |
| +----------------------------------------------------------------------+ | |
| | This source file is subject to version 3.01 of the PHP license, | | |
| | that is bundled with this package in the file LICENSE, and is | | |
| | available through the world-wide-web at the following url: | |
| <?php | |
| $adServer = "ldap://ip"; | |
| $ldap = ldap_connect($adServer); | |
| $username = ''; | |
| $password = ''; | |
| $ldaprdn = 'DOMAIN' . "\\" . $username; | |
| ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3); | |
| ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0); | |
| ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 10); | |
| $bind = ldap_bind($ldap, $ldaprdn, $password); |
| #!/bin/bash | |
| # init only | |
| CONNECT_PID="" | |
| RUNNING="" | |
| # Provide required parameters | |
| FORTICLIENT_PATH="/opt/forticlient-sslvpn/64bit/forticlientsslvpn_cli" | |
| VPN_HOST="<HOST:PORT>" | |
| VPN_USER="<USER_NAME>" |