Skip to content

Instantly share code, notes, and snippets.

@joshtwist
joshtwist / sasApi.js
Created October 10, 2013 20:00
Custom API to let me upload avatars to my blob storage account.
var azure = require('azure');
var qs = require('querystring');
function getSAS(accountName, accountKey, path, resourceType, sharedAccessPolicy) {
return qs.encode(new azure.SharedAccessSignature(accountName, accountKey)
.generateSignedQueryString(path, {}, resourceType, sharedAccessPolicy));
}
function formatDate(date){
var raw = date.toJSON();
@joshtwist
joshtwist / query.js
Created April 9, 2013 23:21
Modifying query components
function read(query, user, request) {
var queryComponents = query.getComponents();
/*
{ filters: null,
selections: [],
projection: null,
ordering: {},
skip: null,
take: 50,
table: 'test',
@yys
yys / gist:2924744
Created June 13, 2012 15:22 — forked from longzheng/gist:2308859
Windows 8 default XAML templates and styles
<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to [###LICENSE_NAME###].
// Please see [###LICENSE_LINK###] for details.
// All other rights reserved.
//
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
@kmorcinek
kmorcinek / .gitignore
Last active October 7, 2025 20:05
.gitignore for C# projects
# The following command works for downloading when using Git for Windows:
# curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
#
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
#
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files