Skip to content

Instantly share code, notes, and snippets.

View LeeCheneler's full-sized avatar

Lee Cheneler LeeCheneler

  • Enzyme Software
  • UK
  • 22:19 (UTC)
View GitHub Profile
@LeeCheneler
LeeCheneler / css-spinner-fading-tail.css
Created July 11, 2016 08:19
Apply to a div for a spinner with a faded tail
.css-spinner-fading-tail {
border-radius: 50%;
background: -moz-linear-gradient(left, #dddddd 10%, rgba(0, 0, 0, 0) 82%);
background: -webkit-linear-gradient(left, #dddddd 10%, rgba(0, 0, 0, 0) 82%);
background: -o-linear-gradient(left, #dddddd 10%, rgba(0, 0, 0, 0) 82%);
background: -ms-linear-gradient(left, #dddddd 10%, rgba(0, 0, 0, 0) 82%);
background: linear-gradient(to right, #dddddd 10%, rgba(0, 0, 0, 0) 82%);
-webkit-animation: load3 1.4s infinite linear;
animation: load3 1.4s infinite linear;
-webkit-transform: translateZ(0);
@LeeCheneler
LeeCheneler / ko-innertext-binding.js
Created October 10, 2016 20:45
twoway binding for innerText (textContent in firefox) property on DOM element
/*
*
* innertext binding - twoway binding between dom and knockout observable
*
*/
// Helper class
var KOInnerTextHelper = (typeof KOInnerTextHelper !== 'undefined') ?
KOInnerTextHelper :
function () {
@LeeCheneler
LeeCheneler / Ninject.Http.cs
Created October 10, 2016 20:47 — forked from odytrice/Ninject.Http.cs
A small Library to configure Ninject (A Dependency Injection Library) with a WebAPI Application.
using Ninject.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Http;
using System.Web.Http.Dependencies;
// A small Library to configure Ninject (A Dependency Injection Library) with a WebAPI Application.
@LeeCheneler
LeeCheneler / Ninject.Mvc.cs
Created October 10, 2016 20:48 — forked from odytrice/Ninject.Mvc.cs
A small Library to configure Ninject (A Dependency Injection Library) with an ASP.NET Application.
using Ninject;
using Ninject.Modules;
using Ninject.Web.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Mvc;
@LeeCheneler
LeeCheneler / Request Header Logging Asp.Net Core Middleware.cs
Created October 19, 2016 19:15
Request Header Logging Asp.Net Core Middleware
using System;
using System.Text;
using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetcore.Builder
{
public static class IApplicationBuilderExtensions
{
/// <summary>
/// Logs all request headers
@LeeCheneler
LeeCheneler / .stylelintrc
Last active May 16, 2017 10:27
Example stylelint config
{
"extends": "stylelint-config-sass-guidelines",
"ignoreFiles": [],
"plugins": [
"stylelint-order",
"stylelint-scss",
"stylelint-selector-bem-pattern"
],
"rules": {
"order/properties-alphabetical-order": null,
// palindrome = (n, c) => {
// l = c.length
// s = ''
// a = n / 2
// m = Math.min
// for (i = 0; i < a;) {
// s += c[m(l - 1, i++)]
// }
material theme
meterial icon theme
vscose-icons
atom one dark theme
prettier code formatter
@LeeCheneler
LeeCheneler / New Laptop Setup.md
Last active January 22, 2019 10:41
New laptop setup

system

  • Encrypt drive
  • Generate id_rsa ssh key and update on GitHub

Programs

  • Chrome + Lastpass, uBlock Origin, React Developer Tools and Redux DevTools extensions
  • slack
  • VS Code + settings sync extension
@LeeCheneler
LeeCheneler / Counter.js
Created August 24, 2018 09:51
Example counter react component
class Counter extends React.Component {
state = {
count: 0
}
onClick = () => {
this.setState(prevState => ({ ...prevState, count: prevState.count + 1 }))
}