Skip to content

Instantly share code, notes, and snippets.

@Voronoff
Voronoff / gotour_#70.go
Created December 7, 2012 23:40
Generalized solution for comparing binary trees of integers
//Solution for tour.golang.org/#70
//Generalized so it neither requires trees of the same size
//nor sorted trees - where the value of the node to left is smaller
//than the current node and the value to the right is greater
//by David Allen
package main
import (
"tour/tree"
@Voronoff
Voronoff / crystal_vagrant_instructions.md
Last active June 24, 2017 20:05
Installing an Ubuntu VM managed with Vagrant for Crystal development on Windows
@Voronoff
Voronoff / .bashrc
Last active August 25, 2017 21:19
Bash on Ubuntu on Windows configuration
#additions
# For switching to mounted home easily
cd() {
if [[ $@ == "m~" ]]; then
command cd "/mnt/c/Users/david"
else
command cd "$@"
fi
}

To start your Phoenix server from the root folder of your application:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with npm install --prefix assets
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

@Voronoff
Voronoff / wsl_setup.md
Last active September 29, 2023 16:41
Windows development in 2018: Setting up a coding environment using Windows Subsystems for Linux (WSL), Hyper, and Visual Studio Code (vscode) with Python.

If you're here just for the section on vscode working with Python on WSL, jump here.

Creating a modern development environment in Windows

Windows is now a development environment that can compete with Mac and Linux. Windows Subsystems for Linux lets you have an Ubuntu (or other Linux flavor) installation that works near seemlessly inside of Windows. Hyper Terminal running WSL's Bash and Visual Studio Code feel really nice to code in. These are instructions for getting set up and smoothing out most of the remaining rough edges. I've included a section on getting vscode to work well with Python and WSL, but the general pattern should be usable for any unsupported language (as of now, I believe it's only Node.js that has WSL support in vscode).

Table of Contents