dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
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
# Insert your company-hash here. When you get the download link, this is the long alpha-numeric scring | |
# that comes after setupdownloader_ in the filename. | |
# Do not include the square brackets (but do include the = if there is one). | |
$CompanyHash = "" | |
### Modify below this line at your own risk! | |
# If it's already installed, just do nothing | |
$Installed = Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" | | |
Where-Object { $_.DisplayName -eq "Bitdefender Endpoint Security Tools" } |
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 | |
echo "Password for Samba User 'snippets':" | |
read -s smb_password_snippets | |
echo "Password for S3 User 'admin':" | |
read -s s3_password_admin | |
echo "Password for S3 User 'dev' (min-length: 8):" | |
read -s s3_password_dev | |
echo "Password for S3 User 'api' (min-length: 8):" | |
read -s s3_password_api | |
wget -O /usr/local/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio |
See also:
Service | Type | Storage | Limitations |
---|---|---|---|
Amazon DynamoDB | 25 GB | ||
Amazon RDS | |||
Azure SQL Database | MS SQL Server | ||
👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
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 | |
# NextCloud Installation Script for Ubuntu 16.04 | |
# with SSL certificate provided by Let's Encrypt (letsencrypt.org) | |
# Author: Autoize (autoize.com) | |
nextcloud_url='https://example.com' # Full URL of NextCloud instance | |
letsencrypt_domains='-d example.com -d www.example.com' # Hostname(s) to obtain SSL certificate for, following -d flag | |
letsencrypt_email='[email protected]' # Admin contact email for Let's Encrypt | |
nextcloud_version='12.0.3' # Desired NextCloud version |
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 | |
$content = json_decode(file_get_contents("filename.json")), true); | |
mysql_connect('localhost', 'user', 'pass'); | |
mysql_select_db('db'); | |
foreach($content as $item) { | |
$columns = implode(", ",array_keys($item)); | |
$escaped_values = array_map('mysql_real_escape_string', array_values($item)); |
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
@echo off | |
rem | |
rem **************************************************************************** | |
rem | |
rem Copyright (c) Microsoft Corporation. All rights reserved. | |
rem This code is licensed under the Microsoft Public License. | |
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF | |
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY | |
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR | |
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. |
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/sh | |
yum install -y qemu-img iscsi-initiator-utils scsi-target-utils.x86_64 qemu-img --nogpgcheck | |
mkdir /data | |
qemu-img create /data/netdisk01.raw 10G | |
losetup /dev/loop0 /data/netdisk01.raw | |
cp /etc/tgt/targets.conf /etc/tgt/targets.conf.bak | |
cat > /etc/tgt/targets.conf <<EOF | |
default-driver iscsi | |
<target iqn.2008-09.com.example:server.target1> | |
backing-store /dev/loop0 |
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
#!/usr/bin/env python | |
import sys | |
import time | |
import signal | |
from subprocess import Popen, PIPE | |
dd = Popen(['dd'] + sys.argv[1:], stderr=PIPE) | |
while dd.poll() is None: | |
time.sleep(.3) | |
dd.send_signal(signal.SIGUSR1) |