Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mark Bolden MarkBolden

🎯
Focusing
View GitHub Profile
@MarkBolden
MarkBolden / WSL-ssh-server.md
Created Dec 4, 2018 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux
View WSL-ssh-server.md

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Uninstall and reinstall the ssh server using the following commands:
    1. sudo apt remove openssh-server
    2. sudo apt install openssh-server
  2. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change UsePrivilegeSeparation to no
View gist:e7f9ea29d2a2efbbe48c6a1161ffbe20
/*
var Trait1 = {
method1() {}
};
var Trait2 = {
method2() {}
};
var Trait3 = mixin({
@MarkBolden
MarkBolden / functions.php
Created Nov 13, 2020 — forked from contemplate/functions.php
WooCommerce - Allow guest checkout for certain products when Guest checkout is Disabled globally
View functions.php
/*--------------------------------------
Woocommerce - Allow Guest Checkout on Certain products
----------------------------------------*/
// Display Guest Checkout Field
add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' );
function woo_add_custom_general_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';