Skip to content

Instantly share code, notes, and snippets.

@frankfenghua
frankfenghua / WSL-ssh-server.md
Created June 11, 2018 10:52 — 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

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)
  3. Change UsePrivilegeSeparation to no

JSX Spread Attributes

If you know all the properties that you want to place on a component a head of time, it is easy to use JSX:

  var component = <Component foo={x} bar={y} />;

Mutating Props is Bad, mkay

@frankfenghua
frankfenghua / gitflow-breakdown.md
Created June 8, 2017 21:20 — forked from Leland/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

gitflow | git

@frankfenghua
frankfenghua / chrome-web-security.sh
Created December 19, 2016 03:00 — forked from ricca509/chrome-web-security.sh
Chrome: Disable web security [OSX]
// OSX
open -na Google\ Chrome --args --disable-web-security --user-data-dir="/tmp/chrome_dev"
Follow below instructions to install svn 1.8 on OSX Yosemite 10.10/xcode6 install which comes with svn 1.7.17
Open Terminal:
sudo -s
#
# create link to toolchain
#
ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain
@frankfenghua
frankfenghua / gist:c4d8de92c1ee7b0d4b7a
Created March 23, 2016 15:27 — forked from Steven-Rose/gist:3943830
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.