Skip to content

Instantly share code, notes, and snippets.

View Alan01252's full-sized avatar

Alan Hollis Alan01252

View GitHub Profile
from homeassistant.helpers.entity import Entity
import AdvancedHTMLParser
import urllib.request
import requests
@Alan01252
Alan01252 / netboot.nix
Created November 12, 2020 12:58 — forked from erincandescent/netboot.nix
netbooting a raspberry pi running alpine with nix
# dhcp server settings:
# dhcp-mac=set:rpi,b8:27:eb:*:*:*
# dhcp-boot=tag:rpi,boot,10.69.69.179
{ lib, stdenv, config, pkgs, ... }:
let
alpineRelease = "3.11";
alpineRevision = "2";
alpineVersion = "${alpineRelease}.${alpineRevision}";
2449:M 26 May 02:03:19.032 - 40 clients connected (0 slaves), 3720952 bytes in use
2449:M 26 May 02:03:22.442 - Accepted 127.0.0.1:51962
2449:M 26 May 02:03:22.443 - Client closed connection
2449:M 26 May 02:03:22.443 - Accepted 127.0.0.1:51964
2449:M 26 May 02:03:22.640 - Accepted 127.0.0.1:51972
2449:M 26 May 02:03:22.642 - Accepted 127.0.0.1:51974
2449:M 26 May 02:03:22.834 - Accepted 127.0.0.1:51986
2449:M 26 May 02:03:24.087 - DB 0: 79 keys (0 volatile) in 128 slots HT.
2449:M 26 May 02:03:24.088 - 40 clients connected (0 slaves), 3644136 bytes in use
2449:M 26 May 02:03:24.801 - Accepted 127.0.0.1:52118
@Alan01252
Alan01252 / test.js
Created May 22, 2016 14:06
multiplex memory leak
var multiplex = require('multiplex');
var debug = require('debug')('test')
var plex1 = multiplex();
var plex2 = multiplex()
plex1.pipe(plex2);
plex2.pipe(plex1);
function createStream(name) {
---
- hosts: all
sudo: false
vars:
ngnix_server_the_farming_forum:
enabled: True
default: True
name: [ "thefarmingforum.co.uk" ]
options: |
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.alan01252</groupId>
<artifactId>dynamics-crm-connect</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
import com.microsoft.schemas._2003._10.serialization.arrays.ArrayOfstring;
import com.microsoft.schemas.xrm._2011.contracts.ColumnSet;
import com.microsoft.schemas.xrm._2011.contracts.EntityCollection;
import com.microsoft.schemas.xrm._2011.contracts.OrganizationService;
import com.microsoft.schemas.xrm._2011.contracts.QueryByAttribute;
import com.microsoft.schemas.xrm._2011.contracts.services.IOrganizationService;
import org.apache.cxf.Bus;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.EndpointImpl;
Before tidying!!!!!
/**
* This is an example of the structure returned from this function.
*
* $serviceData = [
* ['Points','Account 1','Account 2','Account 3'],
* [100,1000,null,null],
* [50,null,2000,null],
* [75,null,null,3000],
app.get('/account/servicevsrevenuestats/',function(req,res){
require('../vendor/reports/servicevsrevenue').get_service_vs_revenue_report(req,res);
});
app.get('/reports/servicevsrevenuestats/',function(req,res){
require('../vendor/reports/servicevsrevenue').get_service_vs_revenue_report(req,res);
});
Entity\Events Object
(
[attributes:protected] => Array
(
[__v] => 1
[_id] => 5033556ac881f4a011000039
[createdAt] => DateTime Object
(
[date] => 2012-08-21 09:31:22
[timezone_type] => 2