Skip to content

Instantly share code, notes, and snippets.

View jjasonclark's full-sized avatar
🏠
Working from home

Jason Clark jjasonclark

🏠
Working from home
View GitHub Profile
[alias]
st = status --short -b
ci = commit
co = checkout
di = diff --color=auto
dc = diff --cached --color=auto
amend = commit --amend
aa = add --all
lo = log --graph -n 20 --pretty='format:%C(bold blue)%h%Creset -%C(bold red)%d%Creset %s %Cgreen(%ar) %C(bold yellow)<%an>%Creset'
this = log -n 20 --no-merges --first-parent --pretty='format:%C(bold blue)%h%Creset -%C(bold red)%d%Creset %s %Cgreen(%ar) %C(bold yellow)<%an>%Creset'
class ApiVersion
def initialize(version_string, params={})
@version = version_string.to_s
options = params || Hash.new
@default = options.fetch(:default) { false }
end
def matches?(request)
return true if @default
request_version = request.headers['X-API-Version'].to_s
<%@ Page Language="C#" ClassName="GZipReturn"%>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.IO.Compression" %>
<script type="text/C#" runat="server">
public void Page_Load()
{
Response.AppendHeader("Content-encoding", "gzip");
try
<%@ Language=C# EnableViewState=false %>
<script runat=server language="c#">
private char[] buffer;
private void setupBuffer()
{
buffer = new char[1024];
for (int i = 0; i < buffer.Length; ++i)
{
buffer[i] = char.ConvertFromUtf32((i%80) + 32)[0];
}
<% @Language=C# EnableViewState=false %>
<script runat=server language="c#">
void Page_Load(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(5000);
}
</script>
<html>
<body
Deleyed 5 seconds
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.Sdk.Build.ValidationLibrary
{
internal class Pair<LeftT, RightT>
{
private LeftT _left;
private RightT _right;
using System;
using System.Text.RegularExpressions;
using System.Collections.Specialized;
using System.IO;
using System.Reflection;
namespace regexTest
{
/// <summary>
/// Summary description for Class1.
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
namespace network
{
template<class T, class returnType, returnType (__stdcall *postProcessFunction)(T) >
class autoCloser
{
private:
typedef returnType (__stdcall blah)(T);
blah* closeFunction;
T argument;
public:
autoCloser(T Inital, blah* CloseFunction = postProcessFunction)
: argument(Inital), closeFunction(CloseFunction)
using System;
using System.Collections.Generic;
namespace BinaryTree
{
public class BinaryTree<T>
{
public T Value { get; set; }
public BinaryTree<T> ParentNode { get; private set; }
public BinaryTree<T> LeftNode { get; private set; }