Skip to content

Instantly share code, notes, and snippets.

@tjrobinson
tjrobinson / CommonLoggingTarget.cs
Created July 26, 2011 16:17
Common.Logging.NLog2
using System;
using System.Collections.Generic;
using Common.Logging;
using Common.Logging.Configuration;
using NLog;
using NLog.Targets;
using CommonLogging = Common.Logging;
namespace Hydra.Common.Infrastructure.Crosscutting.Logging.NLog
{
@tjrobinson
tjrobinson / jquery.bannerrotator.css
Created August 11, 2011 15:23
jquery.bannerrotator
.bannerrotator a.linkbox {
background: #ddd;
opacity: .5;
filter: alpha(opacity=50);
}
.bannerrotator a.linkbox:hover {
background: white;
opacity: 1;
filter: alpha(opacity=100);
}
using System;
using System.Collections.Generic;
using Microsoft.Synchronization;
using Microsoft.Synchronization.MetadataStorage;
using Microsoft.Synchronization.SimpleProviders;
namespace RemoteStorage
{
/// <summary>
/// Abstract class containing common functionality used by all FullEnumerationSimpleSyncProviders
@tjrobinson
tjrobinson / Python27.reg
Created January 17, 2012 21:18
Python for Windows registry entries for Windows x64
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\Help]
@tjrobinson
tjrobinson / gist:1633831
Created January 18, 2012 16:21
Generate EDMX file from Entity Framework Code First Context
// See: http://social.msdn.microsoft.com/Forums/en-US/adonetefx/thread/4aa54da1-3099-48ef-9402-ca94cbca19eb/
builder.DiscoverEntitiesFromContext(typeof(MyContext));
DbModel model = builder.CreateModel();
XmlWriter writer = new XmlTextWriter(Path + "MyContext.edmx", Encoding.UTF8);
model.WriteEdmx(conn, writer);
writer.Close();
@tjrobinson
tjrobinson / MachineKeyBasedEncryptor.cs
Created January 19, 2012 11:25
MachineKeyBasedEncryptor
using System;
using System.IO;
using System.IO.Compression;
using System.Text;
using System.Web;
using System.Web.Security;
public static class MachineKeyBasedEncryptor
{
public static string Encrypt(string value)
@tjrobinson
tjrobinson / profanity.csv
Last active June 15, 2017 16:17
Profanity list for use with content filters
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
amcik
arse
arsehole
arserape
arsewipe
ass
asses
asshole
assholes
assramer
@tjrobinson
tjrobinson / SubversionTests.ps1
Created May 17, 2012 08:02
Subversion Tests
# Usage: cd \; . c:\SubversionTests.ps1; BranchingTest1
function Create-LocalRepository
{
param
(
[string]$basePath,
[string]$repositoryName
)
@tjrobinson
tjrobinson / gist:3046352
Created July 4, 2012 09:31
PowerShell CmdLet in C#
using System.Management.Automation;
[Cmdlet(VerbsCommon.Get, "HelloWorld")]
public class GetHelloWorld : Cmdlet
{
protected override void ProcessRecord()
{
base.ProcessRecord();
WriteObject("HelloWorld");
}
@tjrobinson
tjrobinson / runwithpowershell.reg
Created November 7, 2012 14:02
Run with PowerShell
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\Shell\Run with PowerShell]
[HKEY_CLASSES_ROOT\*\Shell\Run with PowerShell\command]
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit &'%1'"