Skip to content

Instantly share code, notes, and snippets.

@AjkayAlan
AjkayAlan / WSLWindows10Setup.md
Last active Jun 11, 2021
Windows SubSystem For Linux setup that I like with some developers stuff mixed in
View WSLWindows10Setup.md

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update
@laterbreh
laterbreh / Express 4 and Socket.io: Passing socket.io to routes - app.js
Last active Apr 28, 2021
Express 4 and Socket.io: Passing socket.io to routes.
View Express 4 and Socket.io: Passing socket.io to routes - app.js
var app = express();
app.io = require('socket.io')();
var routes = require('./routes/index')(app.io);
app.use('/', routes);
@ghoseb
ghoseb / factorial.py
Created Nov 14, 2008
The evolution of a Python Programmer
View factorial.py
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal