Skip to content

Instantly share code, notes, and snippets.

View rossnelson's full-sized avatar
💀

Ross Nelson rossnelson

💀
View GitHub Profile
const _ = require("lodash");
const manifest = {
common: {
device_id: {
compressed: "d",
},
access_method_id: {
compressed: "ami",
},
@rossnelson
rossnelson / docker-compose.yaml
Created January 26, 2021 14:24
golang and ms sqlserver using sqlx and go-mssqldb
version: '3'
services:
mssql:
image: mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Melon40twomonkeys
ports:
- '1433:1433'
.nav {
overflow: hidden;
}
.nav .menu-item {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
@rossnelson
rossnelson / Other
Last active October 28, 2019 18:17
<CommandClass id="67" name="COMMAND_CLASS_THERMOSTAT_SETPOINT">
<Compatibility>
<Base>0</Base>
</Compatibility>
<State>
<CCVersion>2</CCVersion>
<InNif>true</InNif>
<StaticRequests>0</StaticRequests>
</State>
<Instance index="1" />
@rossnelson
rossnelson / cloudwatch-queries.log
Last active July 11, 2018 22:17
stashed hab troubleshooting queries
{ $.message = "Commands dequeued for 9a9408d0-7944-11e8-838b-755f39858ca5*" }
{ $.message = "Queuing Commands" && $.meta.device_id = 7648e670-794a-11e8-a713-ffdab1da4ab3 }
{ $.message = "Started GET \"/integrations/devices/*/commands*" && $.customer = "hab-plaza*" }
const _ = require('lodash');
module.exports = App => {
return function composer(superclass) {
const mixins = superclass.mixins();
mixins.forEach(mixin => {
mixin = App.get(`Resources.Mixins.${mixin}`);
defineInstanceFunctions(superclass, mixin);
@rossnelson
rossnelson / user_status.sql
Created April 24, 2018 17:50
Get the statuses for a user's active tv shows and sort them by next unwatched episode
WITH episodes as (
select
_status.id,
user_id,
show_id,
episode->>'id' episode_id,
_show.remote_show->>'SeriesName' series_name,
episode->>'SeasonNumber' season_index,
episode->>'EpisodeNumber' episode_index,
@rossnelson
rossnelson / install.md
Last active May 2, 2020 15:49
propagate integration bash git scripts

install tig: https://jonas.github.io/tig/INSTALL.html then add these functions to your ~/.bashrc and restart your terminal session. Now these commands are available

Deploy Master to Staging

function deploy_staging {
  gco master && gp;
  gco staging && git reset master --hard && gp;
  gco master;
  tig
@rossnelson
rossnelson / DetailsView.js
Created February 27, 2018 14:47
Build Failure
Ext.define('Hab.view.tenants.items.details.DetailsView', {
xtype: 'detailsview',
cls: 'detailsview',
controller: { type: 'detailsviewcontroller' },
viewModel: { type: 'detailsviewmodel' },
requires: [
'Ext.grid.Grid'
],
extend: 'Ext.panel.Panel',
tbar: [
@rossnelson
rossnelson / Devices.js
Created February 21, 2018 22:58
store that calls multiple endpoints.
Ext.define('Hab.store.Devices', {
extend: 'Ext.data.Store',
storeId: 'devices',
alias: 'store.devices',
model: 'Hab.model.Device',
proxy: {
type: 'knetikcloud',