First install Windows Terminal from the Microsoft Store on Windows 10 https://docs.microsoft.com/en-us/windows/terminal/
Then use that to install postgres in Debian WSL
First install Windows Terminal from the Microsoft Store on Windows 10 https://docs.microsoft.com/en-us/windows/terminal/
Then use that to install postgres in Debian WSL
#!/usr/bin/env python | |
# Print POST request body to console | |
# | |
# To run it.. | |
# virtualenv env | |
# source ./env/bin/activate | |
# pip install cherrypy | |
# python main.py | |
# |
// This script requires Express 2.4.2 | |
// It echoes the xml body in the request to the response | |
// | |
// Run this script like so: | |
// curl -v -X POST -H 'Content-Type: application/xml' -d '<hello>world</hello>' http://localhost:3000 | |
var express = require('express'), | |
app = express.createServer(); | |
express.bodyParser.parse['application/xml'] = function(data) { | |
return data; |
// This is an example of the Route Param Pre-condition | |
// feature of Express. It also uses express-namespace | |
// Documentation for the Route Param Pre-condition can | |
// be found here: | |
// http://expressjs.com/guide.html#route-param pre-conditions | |
var express = require('express'), | |
ns = require('express-namespace'), | |
app = express.createServer(); | |
app.param('id', function(req, res, next, id) { |
var express = require('express'); | |
var app = express.createServer(); | |
app.use(express.cookieParser()); | |
app.get('/', function(req, res) { | |
// Prints undefined | |
process.stdout.write('req.cookies.RelayState = ' | |
+ JSON.stringify(req.cookies.RelayState) + '\n'); | |
// Prints undefined |
# Install the necessary packages | |
# Assumes node.js/npm and ruby/gem are already installed | |
npm install less | |
gem install watchr | |
Create a .less file. | |
Run this (replace <filename> with the actual filename) | |
watchr -e 'watch("<filename>") { |f| system("lessc #{f[0]}") }' & |
(comment Snippet of clojure to show how to connect to, insert, and query hsqldb) | |
(use 'korma.db) | |
(use 'korma.core) | |
(comment | |
The defdb call below assumes the following: | |
1. hsqldb has been started: | |
java -cp ../hsqldb/lib/hsqldb.jar org.hsqldb.server.Server --database.0 file:mydb --dbname.0 xdb |