Skip to content

Instantly share code, notes, and snippets.

View stackwalker's full-sized avatar

Chris Anderson stackwalker

View GitHub Profile
import React, {useContext} from 'react';
import './App.css';
const StoreContext = React.createContext()
class Store {
constructor(){
this.count = 1
}
incrementCount = (x) => {
20:19:17 62.413761 T:1963171840 NOTICE: DVDPlayer: Opening: http://192.168.1.20:1396/%25/3B2108931E7EE4903219EC41C9A8C7C7/Days%2520of%2520Our%2520Lives_KTVBHD_2016_04_05_12_59_00.wtv
20:19:17 62.413963 T:1963171840 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:19:17 62.414696 T:1469043616 NOTICE: Creating InputStream
20:19:17 62.427071 T:1469043616 NOTICE: Creating Demuxer
20:19:17 62.763279 T:1469043616 NOTICE: OMXPlayerUnsuitable OMXPlayer unsuitable due to video codec (2:0/1)
20:19:17 62.779602 T:1886380960 NOTICE: Found 2 Lists of Devices
20:19:17 62.779697 T:1886380960 NOTICE: Enumerated PI devices:
20:19:17 62.779732 T:1886380960 NOTICE: Device 1
20:19:17 62.779846 T:1886380960 NOTICE: m_deviceName : HDMI
20:19:17 62.779881 T:1886380960 NOTICE: m_displayName : HDMI
angular.module('spokeroot.services')
.factory('analyticsSvc', ['$rootScope', '$http', '$q', function($rootScope, $http, $q){
var svc = {};
var period, startDate, endDate,
visitSummary, devices, referrerTypes,
visitsByDay, visitsByTime, pageUrls,
referringSites, visitorLog;
svc.setPeriod = function(period){
angular.module('spokeroot.directives', ['ui.grid'])
.directive('visitorLog', ['d3Service', 'analyticsSvc', function(d3Service, analyticsSvc) {
return {
restrict: 'AE',
replace: true,
templateUrl: '/js/directives/templates/visitorLog.html',
link: function(scope, elem, attrs){
},
controller: ['$scope', 'analyticsSvc', function($scope, analyticsSvc){
var chakram = require('chakram'),
expect = chakram.expect;
var authUrl = 'secret';
var consumerUrl = 'secret';
var consumerId = 'christest11';
describe('Consumer', function(){
it('should get a jwt and crud a consumer', function(){
return chakram.post(authUrl, {
using System;
using System.IO;
using System.Text;
using System.Net;
using Newtonsoft.Json;
namespace apisamples
{
public class HealthwiseAgent
{
public string GetBearerToken(string clientID, string clientSecret)
{
Uri authUri = new Uri("https://auth.test.test-products.local/v1/oauth2/token");
HttpWebRequest req = HttpWebRequest.CreateHttp(authUri);
string basicToken = string.Format("Basic {0}",
Convert.ToBase64String(Encoding.ASCII.GetBytes(clientID + ":" + clientSecret))
);
req.Headers.Add("Authorization", basicToken);
using System;
using System.IO;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
using Newtonsoft.Json;
namespace apisamples
{
public class HealthwiseAgent
@stackwalker
stackwalker / app-status.js
Created December 17, 2015 18:45
custom directive ng-repeat without parent controller
angular.module('engApi.directives')
.directive('appInfo', [function(){
return {
restrict: 'AE',
replace: true,
templateUrl: '/js/directives/templates/app-status.html',
controller: ['$scope', 'goService', function($scope, goService){
$scope.pipelines;
goService.getPipelines('Application_Services')
.then(function(pipelines){
angular.module('spokeroot.controllers', []);
angular.module('spokeroot.services', []);
angular.module('spokeroot.directives', []);
angular.module('spokeroot', ['spokeroot.controllers', 'spokeroot.services', 'spokeroot.directives']);
window.spokeroot = {};
window.spokeroot.charts = {};