This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates an intersection object from two source objects. | |
* | |
* Typescript nicely supports defining intersection types (ie, Foo & Bar ) | |
* But if you have two seperate *instances*, and you want to use them as the implementation | |
* of that intersection, the language doesn't solve that for you. | |
* | |
* This function creates a strongly typed proxy type around the two objects, | |
* and returns members for the intersection of them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Sample.API | |
{ | |
using static Microsoft.Rest.ClientRuntime.IEventListenerExtensions; | |
public class ContainerRegistryManagementClient | |
{ | |
public Microsoft.Rest.ClientRuntime.ISendAsync Sender { get; set; } | |
/// <summary>MISSING DESCRIPTION 05</summary> | |
/// <param name="apiVersion"> The client API version. </param> | |
/// <param name="on200"> </param> | |
/// <param name="listener"> </param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Dictionary<T> { | |
[key: string]: T; | |
} | |
export interface Pair<KEY, VALUETYPE> { | |
key: KEY; | |
value: VALUETYPE; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#============================================================================== | |
# Copyright (c) Microsoft Corporation. All rights reserved. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Replace 'Bitcoin' On Webpages | |
// @namespace https://gist.github.com/fearthecowboy | |
// @description Replaces bitcoin on websites. | |
// @include http://* | |
// @include https://* | |
// @include file://* | |
// @exclude http://userscripts.org/scripts/review/* | |
// @exclude http://userscripts.org/scripts/edit/* | |
// @exclude http://userscripts.org/scripts/edit_src/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2014 Jason Jarrett | |
# | |
# Tab completion for the `gulp` | |
# | |
# Usage: | |
# | |
# To enable powershell <tab> completion for gulp you need to be running | |
# at least PowerShell v3 or greater and add the below to your $PROFILE | |
# | |
# Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install AutoRest globally (so that it is in the PATH) | |
npm install -g autorest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Adblock Plus 2.0] | |
! Title: FearTheCowboy's Filters | |
! Homepage: https://gist.github.com/fearthecowboy/25c3171e74e1c61dab9af7caf91517f0 | |
# Block the "Suggested Posts" from showing in your feed | |
www.facebook.com##:xpath(//*[text()="Suggested Post"]/../../../..) | |
# Block the lame Twitter "Moments" tab. | |
twitter.com###global-actions > .js-moments-tab.moments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@powershell -noninteractive "& ([Scriptblock]::Create( ((gc -raw '%~df0') -replace '^@powershell.*' ) )) %*" & goto :eof | |
### | |
### Example : Just use that first line in a .cmd file and it will execute this file with powershell! | |
### | |
param( $name, $lastname ) | |
write-host -fore green "Well, hello $name $lastname" | |
<# Notes: | |
this works just fine from cmd (or powershell) - even with named parameters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- #1 Place this line at the top of any msbuild script (ie, csproj, etc) --> | |
<PropertyGroup><PowerShell># 2>nul || type %~df0|find /v "setlocal"|find /v "errorlevel"|powershell.exe -noninteractive -& exit %errorlevel% || #</PowerShell></PropertyGroup> | |
<!-- #2 in any target you want to run a script --> | |
<Target Name="default" > | |
<PropertyGroup> <!-- #3 prefix your powershell script with the $(PowerShell) variable, then code as normal! --> | |
<myscript>$(PowerShell) |