Skip to content

Instantly share code, notes, and snippets.

View danroot's full-sized avatar

Daniel Root danroot

View GitHub Profile
@danroot
danroot / index.html
Last active June 1, 2016 01:10
Enter, Trello Dojo Status Board Starter Page. This page contains everything you need to stand up a page that shows time, StatusCake, Weather Underground, and Trello information. You may customize it as needed to fit your screen sizes and organization's needs. To learn more, check out http://leanpub.com/trellodojo
<!DOCTYPE html>
<html>
<head>
<title>Status Board</title>
<script type="text/javascript">
//TODO:Fill out the information below to configure your board.
//This page contains everything you need to stand up a page that shows time, StatusCake,
//Weather Underground, and Trello information. To learn more, check out http://leanpub.com/trellodojo
//You may customize it as needed to fit your screen sizes and organization's needs.
@danroot
danroot / AngularJsHtmlBundle.cs
Last active June 23, 2017 19:08
AngularJS v1 Template Bundler
using System.Web.Optimization;
namespace Company.Web.UI
{
public class AngularJsHtmlBundle : Bundle
{
public AngularJsHtmlBundle(string moduleName, string virtualPath)
: base(virtualPath, null, new[] { (IBundleTransform)new AngularJsHtmlCombine(moduleName) })
{
@danroot
danroot / frostedglass.js
Created November 27, 2017 22:41
frosted glass effect
<script src="//cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js"></script>
<script src="//rawgit.com/abduzeedo/ios7-blur-html5/master/js/StackBlur.js"></script>
var getElementOffset = function (element) {
var de = document.documentElement;
var box = element.getBoundingClientRect();
var top = box.top + window.pageYOffset - de.clientTop;
var left = box.left + window.pageXOffset - de.clientLeft;
return { top: top, left: left };
};
@danroot
danroot / ColorTheWeather.groovy
Last active December 26, 2017 20:41
SmartThings:Color the Weather
/*
Color the weather
Daniel Root
www.danielroot.info
Should work (but not yet tested with) Phillips Hue devices and any SmartThings device that supports "capability.colorControl".
See https://codebender.cc/sketch:28062 for Arduino code that works with the Arduino SmartShield.
*/
preferences {
section("Check the weather in"){
@danroot
danroot / Startup.cs
Last active August 21, 2021 19:00
Use WsFederation in ASP.NET Core 2.0
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.WsFederation;
using System.Xml.Linq;