Skip to content

Instantly share code, notes, and snippets.

@shaneprice
shaneprice / docker.compose
Created April 14, 2020 23:26
docker compose for home assistant and maria db
homeassistant:
container_name: homeassistant
hostname: hass
restart: always
image: homeassistant/home-assistant
devices:
- /dev/ttyACM0:/dev/ttyACM0
- /dev/ttyUSB-ZStick-5G:/dev/ttyUSB-ZStick-5G
volumes:
- ${USERDIR}/docker/homeassistant:/config
#fronius
sensor.current_ac_fronius_inverter_1_http_192_168_1_41:
friendly_name: Solar - Current AC
sensor.current_dc_fronius_inverter_1_http_192_168_1_41:
friendly_name: Solar Current DC
sensor.frequency_ac_fronius_inverter_1_http_192_168_1_41:
friendly_name: Solar - Frequency AC
@shaneprice
shaneprice / History\-1028b36d\entries.json
Last active May 11, 2023 00:57
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///c%3A/%40code/ThalesNZ/AIFS-Helpdesk-UI/src/app/shared/pipes/asset-type.pipe.ts","entries":[{"id":"fds9.ts","timestamp":1655441262899},{"id":"ZU9a.ts","timestamp":1655441719394},{"id":"frpi.ts","timestamp":1655441947836},{"id":"Za92.ts","timestamp":1655441965673},{"id":"Jmca.ts","source":"searchReplace.source","timestamp":1679459236510}]}
@shaneprice
shaneprice / README-Template.md
Created February 17, 2019 22:35 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@shaneprice
shaneprice / install + aurelia.json mods
Created May 23, 2017 09:05 — forked from monkeyhouse/install + aurelia.json mods
aurelia selectize simple custom element
npm install selectize - save
npm install jquery -save
add this to the aurelia.json file in the dependencies section of the vendor bundle
"jquery",
{
"name": "selectize",
"path": "../node_modules/selectize/dist",
@shaneprice
shaneprice / app.html
Last active December 20, 2016 02:11 — forked from jdanyow/app.html
Aurelia Gist
<template>
<require from="pager"></require>
<h1>${message}</h1>
<pager click.delegate="selectPage($event)"></pager>
</template>
@shaneprice
shaneprice / app.html
Last active November 6, 2016 23:05 — forked from jdanyow/app.html
Aurelia file input binding
<template>
<require from="./blob-to-url"></require>
<require from="./file-list-to-array"></require>
<input type="file" multiple accept="image/*" files.bind="selectedFiles">
<div>
<ul>
<li repeat.for="file of selectedFiles | fileListToArray" >
<img src.bind="file | blobToUrl" />
@shaneprice
shaneprice / app.html
Created July 28, 2016 23:10 — forked from JeroenVinke/app.html
Grid: binding to local data with empty button
<template>
<ak-grid k-data-source.bind="datasource"
k-widget.bind="grid"
k-pageable.bind="{ input: true, numeric: false}"
k-filterable.bind="true"
k-sortable.bind="true"
k-scrollable.bind="true">
<ak-col k-title="ProductName" k-field="ProductName"></ak-col>
<ak-col k-title="Unit Price" k-field="UnitPrice" k-format="{0:c}" k-width="130px"></ak-col>
<ak-col k-title="Units In Stock" k-field="UnitsInStock" k-width="130px"></ak-col>
@shaneprice
shaneprice / CountryMigration.cs
Created November 16, 2014 20:47
CodeFirst migration to add countries
public partial class AddCountry : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.Country",
c => new
{
Id = c.Int(nullable: false, identity: true),
Name = c.String(),
@shaneprice
shaneprice / gist:1d9efc236e7e345aaf82
Created November 14, 2014 21:07
File upload using FormData
var fd = new FormData();
//'file' is the parameter expected on the server
fd.append('file', event.target.files[0]);
$.ajax({
url: options.urls.uploadFile,
type: 'POST',
data: fd,
processData: false,
contentType: false