Skip to content

Instantly share code, notes, and snippets.

View mouadcherkaoui's full-sized avatar
🎯
Focusing

Mouad Cherkaoui mouadcherkaoui

🎯
Focusing
View GitHub Profile
public class MefControllerFactory : IControllerFactory
{
private readonly WebScopedContainerManager _containerManager;
public MefControllerFactory(WebScopedContainerManager containerManager)
{
_containerManager = containerManager;
}
#region IControllerFactory Members
using System;
using System.Collections.Specialized;
using System.ComponentModel;
namespace ThomasJaworski.ComponentModel
{
public abstract class ChangeListener : INotifyPropertyChanged, IDisposable
{
#region *** Members ***
protected string _propertyName;
@jmangelo
jmangelo / AppConfig.Transformation.targets
Created February 25, 2011 22:40
VS 2010 SP1 BETA - MSBuild Project file for App.config XML transformations.
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- 20110225 : João Angelo : Compatibility fix for Visual Studio SP1 Beta -->
<!-- 20110224 : Ryan Milligan : Created OverrideAppConfigWithTargetPath target to fix ClickOnce deploy bug -->
<!-- 20100827 : João Angelo : Fixed bug when using Publish command within Visual Studio -->
<PropertyGroup>
<!-- Prevent circular dependency on Build target -->
<PipelineDependsOnBuild>false</PipelineDependsOnBuild>
<!-- Override project config file name (By default is set to Web.config) -->
<ProjectConfigFileName>App.Config</ProjectConfigFileName>
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@ramnathv
ramnathv / gh-pages.md
Created March 28, 2012 15:37
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" &gt; index.html
using System;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;
using ObjectDumper;
using Xunit;
namespace Classdynamic.BK5
@davidhagg
davidhagg / WPF Visual Geometry Border Inside
Created May 5, 2015 04:50
WPF Create Visual with border that appears to be only inside of drawn geometry
private static DrawingVisual CreateVisual()
{
var noBorderPen = new Pen(new SolidColorBrush(Colors.Transparent), 0);
var selectionPen = new Pen(new SolidColorBrush(Colors.Yellow), 20 * 2);
var drawingVisual = new DrawingVisual();
using (var dc = drawingVisual.RenderOpen())
{
StreamGeometry geometry = new StreamGeometry();
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2024 07:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@nicholasdille
nicholasdille / Show-JobProgress.ps1
Last active December 30, 2021 20:38
Retrieve progress from PowerShell job and display progress bar
function Show-JobProgress {
[CmdletBinding()]
param(
[Parameter(Mandatory,ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.Job[]]
$Job
,
[Parameter()]
[ValidateNotNullOrEmpty()]
@Fireforge
Fireforge / push_replace.ps1
Last active October 25, 2019 18:59
Nuget Package push Powershell script with debug/release specific files
#
# push_replace.ps1
#
# This script is designed to produce customized release and debug nupkgs from a Visual Studio C# project. This is especially useful
# for nupkgs that include native DLLs that are different depending upon debug or release mode.
#
# How to use:
# In your .nuspec file in the <files> section, add the following line:
# <file src="$filelist$" target="lib\native" />
# That line is set to go to lib\native because this script was made for handling native DLLs, but that target can be anything.