Skip to content

Instantly share code, notes, and snippets.

View shawnwildermuth's full-sized avatar
:octocat:
Coding and Filming

Shawn Wildermuth shawnwildermuth

:octocat:
Coding and Filming
View GitHub Profile
@shawnwildermuth
shawnwildermuth / index.html
Created August 2, 2013 23:36
A CodePen by Shawn Wildermuth. Promise Kept
<div id="log">
</div>
@shawnwildermuth
shawnwildermuth / app.js
Created October 14, 2014 23:36
Example of Route in AngularJS
module.config(function ($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'templates/order.tmpl.html',
controller: 'orderController',
controllerAs: "order"
});
$routeProvider.when('/status', {
templateUrl: 'templates/status.tmpl.html',
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Authentication.Cookies;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Mvc;
@shawnwildermuth
shawnwildermuth / test.ts
Created February 1, 2016 03:38
Little TypeScript sample
public export class TestMe {
name: string;
isThere: boolean;
constructor() {
this.name = "Hello World";
this.isThere = true;
}
}
homeIndexModule.controller("topicsController", ["$scope", "$http", "dataService", function ($scope, $http, dataService) {
$scope.data = dataService;
$scope.isBusy = false;
//...
}]);
@shawnwildermuth
shawnwildermuth / CleanVS.csx
Created January 10, 2017 01:06
A ScriptCS script that will clean a Visual Studio project directory of files that I don't need. (Think of it as an ignore file that deletes the actual files).
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Diagnostics;
Console.WriteLine("Cleaning current folder and subfolders");
Console.WriteLine();
var toDelete = new [] { "bin","obj","bld","Backup","_UpgradeReport_Files","Debug","Release,ipch","*.mdf","*.ldf","*.suo","Packages","bower_components","node_modules","lib",".vs","artifacts" };
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseStaticFiles();
app.UseAuthentication();
(function () {
"use strict";
})();
@shawnwildermuth
shawnwildermuth / SomeColl.cs
Created May 25, 2018 00:51
Badly formatted Collection that VS won't format.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SomeApp
{
public class SomeStaticCollection : List<Person>
{
@shawnwildermuth
shawnwildermuth / VerifyFiles.ps1
Created June 8, 2018 22:56
Verify Files with Checksums and Powershell
param (
[string]$source = "d:\videoprojects\hwfilm\",
[string]$dest = "g:\hwfilm\",
[switch]$debug
)
$sourceFileList = Get-ChildItem -Path $source -Recurse | Sort-Object -Property FullName
write-host "Files = $($sourceFileList.Length)"
foreach ($file in $sourceFileList) {
$fullPath = $file.fullName.Substring($source.Length)