Skip to content

Instantly share code, notes, and snippets.

Brad Phelan bradphelan

Block or report user

Report or block bradphelan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View heatseeker powershell
# Trigger fuzzy search
Set-PSReadlineKeyHandler `
-Chord 'Ctrl+s' `
-BriefDescription "InsertHeatseekerPathInCommandLine" `
-LongDescription "Run Heatseeker in the PWD, appending any selected paths to the current command" `
-ScriptBlock {
$choices = [IO.File]::ReadAllText($(Resolve-Path .hscache)) | hs
$ps::Insert($choices -join " ")
View teamcity log
[2018-02-26 13:36:16,380] INFO - jetbrains.buildServer.STARTUP - Server shutdown event received
[2018-02-26 13:36:16,382] INFO - jetbrains.buildServer.STARTUP - Current stage: TeamCity server is shutting down
[2018-02-26 13:36:16,382] INFO - jetbrains.buildServer.STARTUP - Stopping the main application
[2018-02-26 13:36:16,483] INFO - jetbrains.buildServer.STARTUP - Destroying the main servlet
[2018-02-26 13:36:16,483] INFO - MainTeamCityApplicationContext - Closing WebApplicationContext for namespace 'buildServer-servlet': startup date [Mon Feb 26 12:47:07 CET 2018]; parent: jetbrains.buildServer.maintenance.WebDispatcherApplicationContext@1dc816b
View SubjectAsPropertyHelper.cs
public class TwoWayBindingWithConversionDemo
public class Model : ReactiveObject
/// <summary>
/// The model length will be in units meters
/// </summary>
[Reactive] public double LengthInMeters { get; set;}
View AzureStartup.cs
using Microsoft.Azure;
using Microsoft.WindowsAzure;
using Owin;
using Weingartner.Distribution.Website.Accounts;
using Weingartner.Distribution.Website.Storage;
using Weingartner.Distribution.Website.Storage.Azure;
namespace Weingartner.Distribution.Website.Hosting.Azure
public class AzureStartup
View Intersect.cs
/// <summary>
/// Faster version of intersect than the eyeshot code.
/// </summary>
/// <param name="this"></param>
/// <param name="other"></param>
/// <param name="intersection"></param>
/// <returns>Returns true if there is an intersection. Returns false if it is colinear.</returns>
public static bool Intersect(this Segment2D @this, Segment2D other, out Point2D intersection)
intersection = null;
View Results.txt
False : Evil time is 668
True : Good time is 261
View EvilLimitRange.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using devDept.Geometry;
using Xunit;
using Xunit.Abstractions;
View Normal.cs
Vector3D Normal(Solid3D.Face face, Point3D p)
return face
(s => s.PointInversion( p, 1e-3, out var coord2D )
? Some((p: s.PointAt(coord2D), n: s.Normal(coord2D)))
: None )
.MaxBy(q => p.DistanceTo(q.p))
View IsTangentConnected.cs
private static bool IsTangentConnected( Solid3D.Face face0, Solid3D.Face face1, Solid3D.Edge edge)
var angle = 1.5 / 180 * Math.PI;
// Then the two faces share an edge.
var surfaces0 = face0.Parametric;
var surfaces1 = face1.Parametric;
Vector3D Normal(Surface[] surfaces, Point3D p)
View SpurGearAnimator.cs
using devDept.Eyeshot.Entities;
using devDept.Geometry;
using ReactiveUI;
using System;
using System.Drawing;
using System.Reactive.Linq;
using System.Runtime.CompilerServices;
using Weingartner.EyeshotExtensions;
using Weingartner.EyeshotExtensions.Assembly3D;
You can’t perform that action at this time.