Skip to content

Instantly share code, notes, and snippets.

@daffl
daffl / rest.js
Last active December 23, 2015 13:49
Feathers rapid start example results
// POST http://localhost:8000/todos
{
"description": "You have to do dishes!"
}
// GET http://localhost:8000/todos
[
@anaisbetts
anaisbetts / FilesystemWatchCache.cs
Created May 8, 2013 22:14
An Rx-friendly Filesystem Watcher
using System;
using System.IO;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using ReactiveUI;
namespace SaveAllTheTime.Models
{
interface IFilesystemWatchCache
{
@dfinke
dfinke / InvokeNodeJS
Created December 25, 2012 20:53
Invokes PowerShell from node
function Invoke-NodeJS {
param(
$PowerShellCommand,
[Switch]$ReturnAsJSON
)
if($ReturnAsJSON) {$PowerShellCommand += " | ConvertTo-Json"}
$tmp = [IO.Path]::GetTempFileName()
@denmerc
denmerc / chat.js
Created March 9, 2012 20:57 — forked from pgte/chat.js
Node Tuts episode 7
var http = require('http'),
sys = require('sys'),
fs = require('fs'),
io = require('socket.io');
var server = http.createServer(function(request, response) {
response.writeHead(200, {
'Content-Type': 'text/html'
});
@LukasKnuth
LukasKnuth / README
Created March 7, 2012 10:40
A simple script that helps setting up your portable tools in the msysgit-shell.
-- Add Portable software to your msysgit-PATH --
If you like to work with your *nix shell even under Windows, you'll
likely use the git-bash provided by msysgit a lot.
A problem might be, that you don't have your tools in the PATH of that
shell and therefore can't use them. Those tools might be on the same
USB-drive as the git-shell, so you would have to adjust the PATH
(if you're allowed to) every time the drive-letter changes.
open Microsoft.FSharp.Linq
open Microsoft.FSharp.Linq.Query
open MongoDB.Driver
open MongoDB.Linq
let inline (?) this key =
( ^a : (member get_Item : ^b -> ^c) (this,key))
let inline (?<-) this key value =
( ^a : (member set_Item : ^b * ^c -> ^d) (this,key,value))
#if INTERACTIVE
#I @"C:\Tools\MongoDB-CSharp\MongoDB.Linq\bin\Debug"
#r "MongoDB.Driver.dll"
#r "MongoDB.Linq.dll"
#r "FSharp.PowerPack.Linq.dll"
#r "System.Core.dll"
#endif
open System
open MongoDB.Driver