Skip to content

Instantly share code, notes, and snippets.

View CuddleBunny's full-sized avatar
🙃

Josh Dovishaw CuddleBunny

🙃
View GitHub Profile
@CuddleBunny
CuddleBunny / gulpfile.js
Created September 30, 2015 15:44
Modular Gulp task builder.
/// <binding AfterBuild='build' />
var gulp = require('gulp'),
bower = require('main-bower-files'),
clean = require('gulp-clean'),
less = require('gulp-less'),
minifyCSS = require('gulp-minify-css'),
rename = require('gulp-rename'),
typescript = require('gulp-tsc'),
uglify = require('gulp-uglify');
@CuddleBunny
CuddleBunny / snippets.js
Created September 30, 2015 15:49
Toolkit for CreateJS Snippets
// Mouse Blocker
this.alpha = 0.01;
this.addEventListener('click', function(e) { });
@CuddleBunny
CuddleBunny / CustomService.cs
Last active December 1, 2019 11:16
DotNetCore Console App with DI and ConfigurationBuilder
using Microsoft.Extensions.Configuration;
using System;
namespace CoreConsole {
public interface ICustomService {
}
public class CustomService : ICustomService {
public CustomService(IConfigurationRoot config) {
[HttpGet]
public async Task<JsonResult> Get()
{
var users = dataContext.TrackingUsers.Include(u => u.TrackingVisits).ThenInclude(v => v.TrackingDevice);
var newton = JsonConvert.SerializeObject(users);
var json_net = Json(users);
return json_net;
}
@CuddleBunny
CuddleBunny / app.html
Last active July 18, 2017 17:00 — forked from jdanyow/app.html
$parent & behavior parser error
<template>
<!-- This works: -->
<div repeat.for="item of things">
${item | test:message2:{ vm: $parent } & signal:'some-signal'}
</div>
<!-- This offends the parser. Uncomment to see error. -->
<!-- <div repeat.for="item of things">
${item | test:message:$parent & signal:'some-signal'}
</div> -->
@CuddleBunny
CuddleBunny / index.ts
Created April 18, 2018 18:42
[Broken] Gulp, Webpack, Browsersync, TypeScript
import * as gulp from 'gulp';
import * as webpack from 'webpack';
import { server } from './server';
import { bundleConfig, vendorConfig } from './webpack';
function webpackHandler(resolve) {
return (error, stats) => {
if(error)
console.error('Webpack', error);
@CuddleBunny
CuddleBunny / examples#basic#main.ts
Created February 6, 2019 00:36
aurelia-cli-plugin-template
/// <reference types="aurelia-loader-webpack/src/webpack-hot-interface"/>
import {Aurelia} from 'aurelia-framework'
import environment from './environment';
import {PLATFORM} from 'aurelia-pal';
import * as Bluebird from 'bluebird';
// remove out if you don't want a Promise polyfill (remove also from webpack.config.js)
Bluebird.config({ warnings: { wForgottenReturn: false } });
export function configure(aurelia: Aurelia) {
@CuddleBunny
CuddleBunny / tailwind.config.js
Created May 4, 2022 21:40
fast design system + tailwind
// TODO: Create a configuration preset to allow npm based projects to bundle their own tailwind and tree shake? #JoshD
module.exports = {
purge: [],
theme: {
colors: {
accent: {
default: 'var(--accent-fill-rest)',
hover: 'var(--accent-fill-hover)',
active: 'var(--accent-fill-active)'
},
@CuddleBunny
CuddleBunny / custom-elements.json
Created May 5, 2022 17:48
custom-elements.json
{
"version": "experimental",
"tags": [
{
"name": "natgen-accordion-item",
"path": "./src\\components\\accordion-item\\accordion-item.ts",
"properties": [
{
"name": "headinglevel",
"description": "Configures the {@link https://www.w3.org/TR/wai-aria-1.1/#aria-level | level} of the\r\nheading element.",
@CuddleBunny
CuddleBunny / Feature.razor
Created October 3, 2022 15:43
Razor Component for the Feature tag helper
@inject IFeatureManager featureManager
@if (Enabled)
{
@ChildContent
}
@code {
// Reference: https://github.com/microsoft/FeatureManagement-Dotnet/blob/main/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs