Skip to content

Instantly share code, notes, and snippets.

View ducas's full-sized avatar

Ducas Francis ducas

  • Readify
  • Sydney, Australia
View GitHub Profile
BinaryMuse / restful.js
Last active March 17, 2019 08:22
Express API with Async/Await
View restful.js
import express from "express";
* Takes a route handling function and returns a function
* that wraps it after first checking that the strings in
* `reserved` are not part of `req.body`. Used for ensuring
* create and update requests do not overwrite server-generated
* values.
function checkReservedParams(routeHandler, ...reserved) {
jstangroome / TeamBuildNumber.targets
Created February 14, 2014 22:32
An MSBuild targets file to retrieve the Team Build Number for TFS 2012. Just <Import> this targets file and specify DependsOnTargets="TeamBuildNumber" in your <Target>.
View TeamBuildNumber.targets
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="">
<Target Name="TeamBuildNumber">
<GetTeamBuildNumber TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" ContinueOnError="true">
<Output TaskParameter="TeamBuildNumber" PropertyName="TF_BUILD_BUILDNUMBER" />
jstangroome / Send-RemotingFile.ps1
Created January 22, 2011 13:04
Transfers a single file to another machine via the PowerShell Remoting protocol
View Send-RemotingFile.ps1
#requires -version 2.0
param (