Skip to content

Instantly share code, notes, and snippets.

View jennings's full-sized avatar
🦄
What a mess I've made

Stephen Jennings jennings

🦄
What a mess I've made
View GitHub Profile
@jennings
jennings / web.config
Created March 11, 2014 02:50
Enable WCF message logging
<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Critical,Information,ActivityTracing"
propagateActivity="true">
<listeners>
<add name="messages"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="c:\inetpub\logs\messages.svclog" />
</listeners>
<#
Run this automatically via this URL:
http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/jennings/11245384/raw/Boxstarter.ps1
#>
Set-WindowsExplorerOptions -EnableShowFileExtensions
Install-WindowsUpdate
Update-ExecutionPolicy RemoteSigned
# General Utilities
@jennings
jennings / IISExpressCertificate.md
Created June 4, 2014 21:20
How to use a real certificate with IIS Express

Generate a certificate and store it in the local computer's certificate store.

Then, use netsh to assign the certificate to a port and application.

netsh http delete sslcert ipport=<hostname>:<port>
netsh http add sslcert ipport=<hostname>:<port> certhash=<certificate-thumbprint> appid=<appid>

For example:

netsh http delete sslcert ipport=0.0.0.0:44301

[ServiceContract]
public interface IService2
{
[OperationContract]
void setSalesItems(setSalesItems obj);
[OperationContract]
void setSalesItemsV3(setSalesItemsV3 obj);
}
[DataContract(Namespace = "")]
@jennings
jennings / git-cheatsheet.md
Last active September 27, 2015 15:47
Miscellaneous Git commands

Rebase the changes branch-base..branch-head onto the master branch

git rebase --onto master branch-base branch-head

Cherry-pick the changes in B since it diverged from A onto the current branch

git checkout base-branch
git cherry-pick A..B
@jennings
jennings / UpdateQuery.sql
Created July 31, 2012 15:17
Composing an update query
--- While composing an update query, it's useful to use
--- a SELECT statement first to make sure you're going to
--- update the correct rows. Formatting the query in
--- this manner lets you alternate between SELECT and UPDATE
--- without commenting and uncommenting parts of the query.
SELECT *
FROM
-- UPDATE TableToUpdate --- Use ALT + Drag to highlight this update
@jennings
jennings / Program.cs
Last active December 5, 2015 23:12
A sample program for Stack Overflow question 34111695 (http://stackoverflow.com/q/34111695/19818)
// See: http://stackoverflow.com/q/34111695/19818
namespace StackOverflow34111695
{
using System;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
@jennings
jennings / osx-setup.sh
Last active December 9, 2015 18:49
Various OS X setup commands
# Lots of these are from https://github.com/pangratz/osx-defaults
# Allow key repeat instead of pop-up accent selector in OS X 10.8
defaults write -g ApplePressAndHoldEnabled -bool false
# Always show scrollbars
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
# Show the ~/Library folder
chflags nohidden ~/Library
@jennings
jennings / UpdateSysinternals.cmd
Created January 12, 2013 06:11
Automatically update a folder full of Sysinternals tools
@echo off
pushd \\live.sysinternals.com\tools
xcopy * %~dp0 /Y /D
popd