Skip to content

Instantly share code, notes, and snippets.

View JamesGreenAU's full-sized avatar

James Green JamesGreenAU

View GitHub Profile
public class CreateResponse
{
// use of JsonPropertyAttribute is supported on properties if needed.
public bool ok { get; set; }
public string id { get; set; }
public string rev { get; set; }
public string error { get; set; }
public string reason { get; set; }
}
public async Task<R> Put<T, R>(T docObject)
{
string DbName = "demodb";
string NewDocId = "newDocId";
// Valid paths, methods and response codes are documented here: http://docs.couchdb.org/en/stable/http-api.html
using (var httpClient = new HttpClient())
{
httpClient.BaseAddress = new Uri("http://server:5984/");
@JamesGreenAU
JamesGreenAU / PostDeploy.ps1
Last active October 14, 2015 07:14
Post deploy step for migrating media from one Umbraco web root to another.
#
# Copies the Media folder from the previous release folder to the newly deployed folder.
#
cd $OctopusOriginalPackageDirectoryPath
cd ..
Write-Host "Moving media folder for release " $OctopusParameters["Octopus.Release.Number"]
$R = Get-ChildItem | Sort-Object Name | select -last 2
$old = $R[0]
@JamesGreenAU
JamesGreenAU / 0_reuse_code.js
Created May 22, 2014 04:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console