Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
What a mess I've made

Stephen Jennings jennings

🦄
What a mess I've made
View GitHub Profile
@jennings
jennings / web.config
Created Mar 11, 2014
Enable WCF message logging
View web.config
<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>
View JavaKeytool.md
View Boxstarter.ps1
<#
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 Jun 4, 2014
How to use a real certificate with IIS Express
View IISExpressCertificate.md

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
View gist:f4b367b8f8cc3ce7eabf
[ServiceContract]
public interface IService2
{
[OperationContract]
void setSalesItems(setSalesItems obj);
[OperationContract]
void setSalesItemsV3(setSalesItemsV3 obj);
}
[DataContract(Namespace = "")]
@jennings
jennings / git-cheatsheet.md
Last active Sep 27, 2015
Miscellaneous Git commands
View git-cheatsheet.md

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 Jul 31, 2012
Composing an update query
View UpdateQuery.sql
--- 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 Dec 5, 2015
A sample program for Stack Overflow question 34111695 (http://stackoverflow.com/q/34111695/19818)
View Program.cs
// 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 Dec 9, 2015
Various OS X setup commands
View osx-setup.sh
# 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 Jan 12, 2013
Automatically update a folder full of Sysinternals tools
View UpdateSysinternals.cmd
@echo off
pushd \\live.sysinternals.com\tools
xcopy * %~dp0 /Y /D
popd
You can’t perform that action at this time.