Skip to content

Instantly share code, notes, and snippets.

View dbuksbaum's full-sized avatar

David Buksbaum dbuksbaum

View GitHub Profile
require 'fileutils'
class Jekyll < Thor
include FileUtils
method_options :format => :optional
def draft(name)
format = options[:format] || "markdown"
slug = name.downcase.gsub(/ +/,'-').gsub(/[^-\w]/,'').sub(/-+$/,'')
filename = slug + ".#{format}"
@GraemeF
GraemeF / gist:500370
Created July 30, 2010 11:46
Behavior which allows the clipboard RoutedCommands to be mapped to other commands
public class ClipboardBehavior : Behavior<Control>
{
public static readonly DependencyProperty CopyCommandProperty =
DependencyProperty.Register("CopyCommand",
typeof (ICommand),
typeof (ClipboardBehavior),
new PropertyMetadata(default(ICommand)));
public static readonly DependencyProperty CutCommandProperty =
DependencyProperty.Register("CutCommand",
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@bradwilson
bradwilson / InlineTask.targets.xml
Created March 11, 2012 00:41
Inline MSBuild task to download NuGet.exe
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
@plaurin
plaurin / DocumentStoreRepository.cs
Last active December 15, 2015 12:28
Document store implementation for Windows Azure Table Storage service using the ElasticTableEntity class
public class ProjectRepository
{
private CloudTable table;
public ProjectRepository()
{
var connectionString = "...";
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
var client = storageAccount.CreateCloudTableClient();
@plaurin
plaurin / DocumentStoreRepositoryUsage.cs
Last active December 15, 2015 12:28
Document store implementation usages
public class Project
{
public Guid Owner { get; set; }
public Guid Id { get; set; }
public string Name { get; set; }
public DateTime StartDate { get; set; }
public int Status { get; set; }
public List<Task> Tasks { get; set; }
}
module Jekyll
class LessConverter < Converter
safe true
priority :high
def setup
return if @setup
require 'less'
@setup = true
rescue LoadError
@23maverick23
23maverick23 / font_awesome.rb
Last active September 24, 2024 14:47
Jekyll: Font Awesome icons Liquid tag
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Ryan Morrissey
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@ctaggart
ctaggart / EdgeJs.FSharp.fs
Last active August 29, 2015 14:02
edge.js
[<AutoOpen>]
module EdgeJs.FSharp
open System
open System.Threading.Tasks
type Async with
static member Box (r:Async<'TResult>) =
async {
let! o = r
@zpbappi
zpbappi / Program.cs
Created August 28, 2016 10:23
Comparison of XorShift128+, XorShiRo128+ and existing .NET Random class
using System;
using System.IO;
namespace RandomTest
{
class Program
{
private static readonly string BasePath =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "random-files");