Skip to content

Instantly share code, notes, and snippets.

View ohookins's full-sized avatar
🤔
Thinking

Oliver Hookins ohookins

🤔
Thinking
View GitHub Profile
@ohookins
ohookins / gist:0ae4f749e58e45a0340c140745ca8073
Created October 29, 2021 08:26
terraform-provider-datadog crash
Stack trace from the terraform-provider-datadog_v3.4.0 plugin:
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 55 [running]:
github.com/terraform-providers/terraform-provider-datadog/datadog.completeSyntheticsTestRequest(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000a6c2c0, ...)
github.com/terraform-providers/terraform-provider-datadog/datadog/resource_datadog_synthetics_test_.go:1193 +0xe13
github.com/terraform-providers/terraform-provider-datadog/datadog.buildSyntheticsAPITestStruct(0xc00008e880, 0x168d681)
github.com/terraform-providers/terraform-provider-datadog/datadog/resource_datadog_synthetics_test_.go:1012 +0x7c8
github.com/terraform-providers/terraform-provider-datadog/datadog.resourceDatadogSyntheticsTestCreate(0x18e4818, 0xc0006642a0, 0xc00008e880, 0x1396d60, 0xc0000f4040, 0xc000a6c080, 0xaa61ea, 0xc000b70180)
### Keybase proof
I hereby claim:
* I am ohookins on github.
* I am ohookins (https://keybase.io/ohookins) on keybase.
* I have a public key ASCQ9bVvn9EtLqoTZY5MtwX_-J3kVWBlbrnNfnyben8AzQo
To claim this, I am signing this object:
@ohookins
ohookins / main.go
Created June 25, 2018 13:20
Simple Go-based HTTP health smoke test server
package main
import (
"fmt"
"flag"
"io"
"log"
"net/http"
"strconv"
)
package main
import (
"math/big"
"strings"
)
const (
idLength = 12
lookupString = "0123456789abcdefghijklmnopqrstuvwxyz"
@ohookins
ohookins / gist:ac4ce3f7ee964fbb7982c5b36d80a0fb
Created March 12, 2018 20:21
Edges-only shader for cube-like things
Shader "Custom/EdgesOnly"
{
Properties
{
_EdgeColor ("Edge Color", Color) = (1,1,1,1)
_EdgeWidth ("Edge Width", Range(0, 0.3)) = 0.1
}
SubShader
{
Undefined symbols for architecture x86_64:
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const", referenced from:
cpr::Session::Impl::makeRequest(void*) in libcpr.a(session.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(unsigned long, unsigned long, char const*, unsigned long) const", referenced from:
cpr::util::parseHeader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libcpr.a(util.cpp.o)
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
void std::__1::vector<curl_forms, std::__1::allocator<curl_forms> >::__push_back_slow_path<curl_forms>(curl_forms&&) in libcpr.a(session.cpp.o)
void std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1
# Git completions
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
# Show git branch name in prompt
function smiley() {
if [ $? -eq 0 ]; then
echo -en '\033[32m:)\033[00m'
else
echo -en '\033[31m:(\033[00m'
@ohookins
ohookins / gist:37e8dc49e12ffd71742d
Created September 7, 2014 21:02
Failed attempt at automatically adjusting content surface
// Constructor function for our ContentView class
function ContentView() {
// Applies View's constructor function to ContentView class
View.apply(this, arguments);
var content = TextData['mycontent'];
// Backgrounds
this.add(new Surface({
size: [undefined, undefined],
@ohookins
ohookins / SlideView.js
Last active August 29, 2015 14:03
Famo.us slideshow with fade-in/slide/fade-out on each slide
/*** SlideView ***/
// define this module in Require.JS
define(function(require, exports, module) {
// Import additional modules to be used in this view
var View = require('famous/core/View');
var ImageSurface = require('famous/surfaces/ImageSurface');
var Transform = require('famous/core/Transform');
var Modifier = require('famous/core/Modifier');
@ohookins
ohookins / presto-bootstrap.rb
Created June 7, 2014 22:55
Working PrestoDB bootstrap script on top of EMR
#!/usr/bin/ruby
require 'json'
require 'emr/common'
require 'digest'
require 'optparse'
def println(*args)
print *args
puts