Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tobysmith568's full-sized avatar

Toby Smith tobysmith568

View GitHub Profile
@cecilemuller
cecilemuller / launch.json
Last active March 14, 2024 11:31
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@LGM-AdrianHum
LGM-AdrianHum / ListBoxStyle.xaml
Created October 11, 2017 23:56
Changing WPF Listbox SelectedItem text color and highlight/background Color
<Window x:Class="ListBoxStyle.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:ListBoxStyle"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style x:Key="_ListBoxItemStyle" TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
@JamieMason
JamieMason / finding-large-nested-dependencies-in-webpack-bundles.md
Created January 16, 2017 11:44
Finding large nested dependencies in Webpack bundles
@AlbertoMonteiro
AlbertoMonteiro / 01.md
Last active January 23, 2024 10:11
Migration from Moq to NSubstitute
@ngocvantran
ngocvantran / MoqExtensions.cs
Last active November 13, 2021 17:46
Extension methods to quickly ignore arguments without repeating It.IsAny<>()
using System;
using System.Linq.Expressions;
using Moq.Language.Flow;
namespace Moq
{
public static class MoqExtensions
{
public static ISetup<T, TResult> SetupIgnoreArgs<T, TResult>(this Mock<T> mock,
Expression<Func<T, TResult>> expression)
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/