View debug.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2023-04-21T21:23:38.734-0700 [INFO] Terraform version: 1.4.5 | |
2023-04-21T21:23:38.734-0700 [DEBUG] using github.com/hashicorp/go-tfe v1.18.0 | |
2023-04-21T21:23:38.734-0700 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2 | |
2023-04-21T21:23:38.734-0700 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2 | |
2023-04-21T21:23:38.734-0700 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0 | |
2023-04-21T21:23:38.734-0700 [DEBUG] using github.com/zclconf/go-cty v1.12.1 | |
2023-04-21T21:23:38.734-0700 [INFO] Go runtime version: go1.19.6 | |
2023-04-21T21:23:38.734-0700 [INFO] CLI args: []string{"./terraform", "plan"} | |
2023-04-21T21:23:38.734-0700 [DEBUG] Attempting to open CLI config file: /Users/pauljohnson/.terraformrc | |
2023-04-21T21:23:38.735-0700 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. |
View generate_terraform.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Apply @generate_terraform_variables(filename="variables.tf") to a definition you want to output as a variables file. | |
package main | |
import ( | |
"fmt" | |
"os" | |
"strings" | |
"text/template" | |
"cuelang.org/go/cue" |
View disable_local_ssd_formatting.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import compute, { protos } from '@google-cloud/compute'; | |
import axios from 'axios'; | |
import util from 'util'; | |
import * as child_process from 'child-process-promise' | |
import { ZoneOperationsClient } from '@google-cloud/compute/build/src/v1'; | |
import { sleep } from '../utils'; | |
import { hasUncaughtExceptionCaptureCallback } from 'process'; | |
type InstanceTemplate = protos.google.cloud.compute.v1.IInstanceTemplate; | |
type InstanceGroupManager = protos.google.cloud.compute.v1.IInstanceGroupManager; |
View test_dict_subclass_get_method.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unlike MutableMapping, dict has it's own implementation of get() that doesn't use __getitem__ underneath. This will cause your subclass to return None unexpectedly, unless you don't implement get() as well. Probably better to just subclass MutableMapping :-). | |
# example code: | |
def test_dict_subclass_get_method(): | |
import collections | |
# WORKS: class Hello(collections.MutableMapping): | |
class Hello(dict): | |
def __init__(self, underlying): | |
super(Hello, self).__init__() | |
self._underlying = underlying |
View Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# Define our MAAS instance | |
config.vm.define "controller", primary: true do |maas| | |
maas.vm.box = "bento/ubuntu-16.04" | |
maas.vm.hostname = "controller" | |
maas.vm.network :private_network, ip: '192.168.50.2' | |
maas.vm.network :forwarded_port, guest: 5240, host: 5240 |
View Recurse center lisp lexer and parser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var NUMBER_CHARS = "0123456789"; | |
var IDENTIFIER_CHARS = '+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
var WHITESPACE_CHARS = ' \r\n\t'; | |
function lex(input) { | |
var i = 0; | |
var tokens = []; | |
while(i < input.length) { | |
var c = input[i]; |
View x_ray_element_properties.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var html = `<html> | |
<body> | |
<div id="someId"> | |
<a href="http://example.com/page1">Page 1</a> | |
<a href="http://example.com/page2">Page 2</a> | |
</div> | |
</body> | |
</html>`; | |
// If you have html like the above and you want to access properties of the links that |
View dev_diary.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-08-24 - NAB - If you are running Kibana in windows and have a proxy set in your environment variables and try to run kibana it will try to go through the proxy to connect to elastic search, to fix this unset the variable in the kibana.bat file: | |
@echo off | |
SETLOCAL | |
set http_proxy= | |
set https_proxy= |
View gist:b3daace52dfa218cd444
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yep Futures/Promises are monads, in scala you'll often see code like: | |
val foo = for { | |
someResult <- doSomethingAsync(someArgument); | |
someOtherResult <- doAnotherThingAsync(someResult); | |
finalResult <- yetAnotherAsyncThing(someOtherResult); | |
} yield (finalResult) | |
foo.recover { | |
case SomeException e => "Something Went Wrong!" |
View gist:9d226b62b7f138802954
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To use PlayCouchbase in before or after methods the traits have to be in this order... | |
class FacebookServiceSpec extends PlaySpec with BeforeAndAfterAll with OneAppPerSuite { | |
override def beforeAll = { | |
val bucket = PlayCouchbase.bucket("default") | |
} | |
} | |
// ... Not like this | |
class FacebookServiceSpec extends PlaySpec with OneAppPerSuite with BeforeAndAfterAll { | |
override def beforeAll = { |
NewerOlder