Skip to content

Instantly share code, notes, and snippets.

@vermorel
vermorel / Half.cs
Last active November 26, 2023 22:43
C# Half-precision data type
/// ================ Half.cs ====================
/// The code is free to use for any reason without any restrictions.
/// Ladislav Lang (2009), Joannes Vermorel (2017)
using System;
using System.Diagnostics;
using System.Globalization;
namespace SystemHalf
{
@jtheisen
jtheisen / boxstarter.ps1
Last active February 21, 2022 11:10
My boxstarter
# Install with this from IE:
# http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/jtheisen/59fef5b48bcb415c5d77a3b86363e240/raw/294d8808123f3f1281bd814a4628caf1f16e1ff1/boxstarter.ps1
# choco feature enable -n=allowGlobalConfirmation
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Disable-BingSearch
# Remove Skydrive from the explorer root
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
@mikernet
mikernet / MethodBindingExtension.cs
Last active July 2, 2022 03:50
Updated Ultimate WPF Method Binding Extension
// Updated Ultimate WPF Event Method Binding implementation by Mike Marynowski
// View the article here: http://www.singulink.com/CodeIndex/post/updated-ultimate-wpf-event-method-binding
// Licensed under the Code Project Open License: http://www.codeproject.com/info/cpol10.aspx
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
@zmilojko
zmilojko / UDPer.cs
Last active December 15, 2021 14:59
C# sends and receives UDP broadcasts
using System;
using System.Net.Sockets;
using System.Net;
using System.Text;
using System.Threading;
namespace UDPer
{
class UDPer
{
@murphybytes
murphybytes / Program.cs
Created July 25, 2012 03:37
Demonstrates using pinvoke to pass a callback from a .net managed application to a C dll
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace MyCSharpApp
{
@andyedinborough
andyedinborough / Example.html
Created February 8, 2012 17:01
A simple JavaScript implementation of the Razor view engine.
<!doctype html>
<html>
<head>
</head>
<body>
<div id="notices"></div>
<script src="Razor.js"></script>
<script type="application/x-razor-js" data-view-id="notice">