Skip to content

Instantly share code, notes, and snippets.

View meklarian's full-sized avatar

Paul Shinn meklarian

View GitHub Profile
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
using System;
using System.Collections.Specialized;
using System.Text;
using System.Web;
using System.Web.Mvc;
using log4net;
/// <summary>
/// Filter pro logování vyjímek pomocí log4net.
/// </summary>
@meklarian
meklarian / git-cheatsheets.txt
Created April 20, 2011 19:29
list of links to various git resources
tutorial site
http://gitimmersion.com/
quick relationship-based lookup of commonly used commands
http://www.ndpsoftware.com/git-cheatsheet.html
hub utility
http://defunkt.io/hub/
github hacker score
@meklarian
meklarian / bacon-savers.md
Last active September 29, 2015 14:28
things that have saved my bacon

Things that have saved my bacon

A running list of things that have saved me countless hours.

Tools

  • beyond compare my favorite diff tool for windows
  • linqpad edit LINQ and immediate-mode C# snippets
  • Cmder improved shell for windows (can do both cmd / ps)
  • Postman web request editor for chrome
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.fn.textchanged = function() {
@pmn
pmn / gist:1145504
Created August 15, 2011 00:26
C# Comb Guid generation
// C# Comb Guid generation
// Found at http://stackoverflow.com/questions/665417/sequential-guid-in-linq-to-sql/2187898#2187898
Guid GenerateComb()
{
byte[] destinationArray = Guid.NewGuid().ToByteArray();
DateTime time = new DateTime(0x76c, 1, 1);
DateTime now = DateTime.Now;
TimeSpan span = new TimeSpan(now.Ticks - time.Ticks);
TimeSpan timeOfDay = now.TimeOfDay;
using System;
using System.Diagnostics;
/// <summary>
/// Serves as a wrapper around objects that require disposal but that do not
/// implement <see cref="System.IDisposable"/>.
/// </summary>
/// <typeparam name="T">The type of <see cref="Object"/></typeparam>
public abstract class DisposerBase<T> : IDisposable
{
using System;
using System.Configuration;
using System.Web;
using System.Web.Mvc;
namespace Example.Web {
public class MvcApplication : HttpApplication {
protected void Application_EndRequest() {
var context = new HttpContextWrapper(Context);
// If we're an ajax request, and doing a 302, then we actually need to do a 401