Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Learning, yearning, occasionally gurning

Daniel Earwicker danielearwicker

💭
Learning, yearning, occasionally gurning
View GitHub Profile
@danielearwicker
danielearwicker / crash.log
Created Apr 11, 2019
Crash in init - Terraform v0.11.13
View crash.log
2019/04/11 14:48:44 [INFO] Terraform version: 0.11.13
2019/04/11 14:48:44 [INFO] Go runtime version: go1.11.5
2019/04/11 14:48:44 [INFO] CLI args: []string{"C:\\_Dev\\Batch\\terraform.exe", "init", "-backend-config=access_key=W8GF4YsrmdMxkx2Mr0WwDIqJeWG/AQS9jV5uNRoiWpXFSi+hx7MK8U4FgzE3hb1tevjyiIh51aDMBd6vRykyKA=="}
2019/04/11 14:48:44 [DEBUG] Attempting to open CLI config file: C:\Users\dearwicker\AppData\Roaming\terraform.rc
2019/04/11 14:48:44 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/04/11 14:48:44 [INFO] CLI command args: []string{"init", "-backend-config=access_key=W8GF4YsrmdMxkx2Mr0WwDIqJeWG/AQS9jV5uNRoiWpXFSi+hx7MK8U4FgzE3hb1tevjyiIh51aDMBd6vRykyKA=="}
2019/04/11 14:48:44 [DEBUG] command: loading backend config file: C:\_Dev\FISCAL\NXG\NXG-API\Products\Data\Data-Infrastructure\environments\liveeu
2019/04/11 14:48:44 [TRACE] module source: "../../modules/infrastructure_deployment"
2019/04/11 14:48:44 [DEBUG] plugin: waiting for all plugin processes to complete...
panic: runtime err
@danielearwicker
danielearwicker / twoWay.js
Created Jul 8, 2017
Very minimal two-way binding example
View twoWay.js
import React from 'react';
function twoWay(Comp) {
return props => {
const { value, children, ...others } = props;
return (
<Comp {...others}
@danielearwicker
danielearwicker / vsenv.bat
Created Jun 7, 2017
Batch file that sets up VS environment from the VS140COMNTOOLS environment variable
View vsenv.bat
@ECHO OFF
WHERE tf 1> NUL 2>&1
IF ERRORLEVEL 1 GOTO :reg
GOTO :noreg
:reg
ECHO Setting up Visual Studio 2015 environment
CALL "%VS140COMNTOOLS%vsvars32.bat"
GOTO :done
@danielearwicker
danielearwicker / CudoEvent.cs
Created Jan 21, 2017
Cudo (Create, Update, Delete, Observe) - subscribers get Create events to recreate current contents, followed by subsequent updates
View CudoEvent.cs
namespace Cudo
{
public class CudoEvent<TRecord>
{
public CudoEvent(CudoEventType type, TRecord record)
{
Type = type;
Record = record;
}
@danielearwicker
danielearwicker / example.ts
Last active Feb 19, 2017
Remox (Redux in MobX)
View example.ts
import { autorun } from "mobx";
import { createStore, Action, Reducer } from "./remox"
interface Person { firstName: string; lastName: string; }
interface SetFirstName { type: "SET_FIRST_NAME", newFirstName: string; }
interface SetLastName { type: "SET_LAST_NAME", newLastName: string; }
function personReducer(state:Person, action: SetFirstName | SetLastName) {
View example.ts
interface Person {
readonly name?: string;
readonly age?: number;
}
const x = record<Person>({ name: "Bart" }).set({ age: 10 });
const y = x.set({ age: 11 });
@danielearwicker
danielearwicker / MediaWikiBackup.cs
Created Feb 19, 2016
Simple minimal backup of mediawiki
View MediaWikiBackup.cs
using System;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
namespace WikiBackup
{
class Program
@danielearwicker
danielearwicker / listenTo.js
Created Mar 17, 2015
Simple demo of pre-logging aspect
View listenTo.js
function listenTo(target, notify) {
var proxy = {};
Object.keys(target).forEach(function(methodName) {
var targetMethod = target[methodName].bind(target);
proxy[methodName] = function() {
var args = Array.prototype.slice.call(arguments);
@danielearwicker
danielearwicker / app.ts
Last active Aug 29, 2015
TypeScript module merging
View app.ts
Test.foo(v => v > 5);
@danielearwicker
danielearwicker / node-recursion-async
Created Jul 22, 2013
A pure library approach to async/await in standard JavaScript #2
View node-recursion-async
var fs = require('fs');
var path = require('path');
var Q = require('q');
var interrupt = require('./interrupt.js');
var readdir = interrupt.bind(Q.nfbind(fs.readdir));
var stat = interrupt.bind(Q.nfbind(fs.stat));
var consoleLog = interrupt.bind(console.log);
You can’t perform that action at this time.