Skip to content

Instantly share code, notes, and snippets.

protected void {0}_UserActivityEvent(object sender, UserActivityEventArgs e)
{{
switch (e.UserActivityEventType)
{{
{18}
}}
}}
vs
@mnaoumov
mnaoumov / gist:4108955
Created November 19, 2012 04:26 — forked from anvaka/gist:4108943
BDD syntax example
[Feature]
public class Tool_usage
{
[Scenario]
public void Use_new_tool()
{
// Can you do this?
Tool tool = default(Tool);
BDD(
if exists (select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'WBC_UserProfileMap' and COLUMN_NAME = 'InitIndicator')
begin
update
WBC_UserProfileMap
set
InitIndicator = 'SELF_REGISTERED'
where
CISKey = 'TestUser80';
update
@mnaoumov
mnaoumov / gist:4575495
Last active December 11, 2015 08:48
git log strange behavior
git log --oneline --decorate master..1.0
ec9988c (tag: build-1.3.2616.0, 1.0) Merge branch '1.0' into mobile
e29326d Merge remote-tracking branch 'origin/1.0' into 1.0
b716f00 Merge branch '1.0' into mobile
faa9bc3 TFS9437 send down correct brand id
25ae928 Fix js hint errors
aef6132 Merge branch 'mobile' of git.f-dev.net:otp into mobile
1d9691a TFS9112 Fix Bug in Mobile:Customer details- Navigation is not working on Time zone page.
50e31c3 Merge branch 'mobile' of git.f-dev.net:otp into mobile
C:\dev> $env:GIT_TRACE=1
C:\dev> $env:GIT_CURL_VERBOSE=1
C:\dev> git clone -v git@github.com:gitextensions/gitextensions.git
trace: built-in: git 'clone' '-v' 'git@github.com:gitextensions/gitextensions.git'
Cloning into 'gitextensions'...
trace: run_command: 'ssh' 'git@github.com' 'git-upload-pack '\''gitextensions/gitextensions.git'\'''
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 155040 on OTPDEV'
trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 155040 on OTPDEV'
remote: Reusing existing pack: 52618, done.
remote: Counting objects: 69, done.
@mnaoumov
mnaoumov / git-trace-https.txt
Created May 26, 2014 23:57
git trace https
C:\dev\1> $env:GIT_TRACE=1
C:\dev\1> $env:GIT_CURL_VERBOSE=1
C:\dev\1> git clone -v https://github.com/gitextensions/gitextensions.git
trace: built-in: git 'clone' '-v' 'https://github.com/gitextensions/gitextensions.git'
Cloning into 'gitextensions'...
trace: run_command: 'git-remote-https' 'origin' 'https://github.com/gitextensions/gitextensions.git'
* Couldn't find host github.com in the _netrc file; using defaults
* Adding handle: conn: 0x2150398
* Adding handle: send: 0
* Adding handle: recv: 0
string testString = @"
FUNCTION ""Timer_€_OC"" : Void
...
END_FUNCTION";
var functionRegex = new Regex(@"FUNCTION\s*\""(?<Name>[^\""]+)\""\s*\:\s*(?<Type>[\S]+)");
var match = functionRegex.Match(testString);
Debug.Assert(match.Groups["Name"].Value == "Timer_€_OC");
<!doctype html>
<html>
<head>
</head>
<body>
<script>
var iframe = document.createElement("iframe");
iframe.src = "http://rawgit.com/mnaoumov/0e5ea2c57bdecf3603e6/raw/09bd76f62e474302d7a7fe6dafb20234acef9fbd/test.html";
setTimeout(function removeIframe() {
// Name: MicrosoftAjaxWebForms.debug.js
// Assembly: System.Web.Extensions
// Version: 4.0.0.0
// FileVersion: 4.0.30319.36278
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// MicrosoftAjaxWebForms.js
// Microsoft AJAX ASP.NET WebForms Framework.
Type._registerScript("MicrosoftAjaxWebForms.js", [
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest
function Replace-ViewState([string] $content)
{
if (-not ($content.Contains("ViewState[")))
{
return $content
}