Skip to content

Instantly share code, notes, and snippets.

@ryepup
ryepup / Dockerfile
Last active August 26, 2022 17:29
otel `tail_sampling` dropping attribute repro
FROM golang:1.19-alpine
WORKDIR /src
COPY go.mod ./
COPY go.sum ./
COPY main.go ./
RUN go build -o /gen-span
ENV OTEL_SERVICE_NAME=gen-span
This file has been truncated, but you can view the full file.
2020/12/24 14:37:54 [INFO] Terraform version: 0.14.0
2020/12/24 14:37:54 [INFO] Go runtime version: go1.15.2
2020/12/24 14:37:54 [INFO] CLI args: []string{"/home/ryan/bin/terraform", "apply", "-auto-approve", "-no-color"}
2020/12/24 14:37:54 [DEBUG] Attempting to open CLI config file: /home/ryan/.terraformrc
2020/12/24 14:37:54 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/12/24 14:37:54 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/12/24 14:37:54 [DEBUG] ignoring non-existing provider search directory /home/ryan/.terraform.d/plugins
2020/12/24 14:37:54 [DEBUG] ignoring non-existing provider search directory /home/ryan/.local/share/terraform/plugins
2020/12/24 14:37:54 [DEBUG] ignoring non-existing provider search directory /usr/share/ubuntu/terraform/plugins
2020/12/24 14:37:54 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
@ryepup
ryepup / from-json-array-file.sh
Created July 4, 2018 12:56
Adding items to an azure storage queue via command line
$ export AZURE_STORAGE_CONNECTION_STRING="COPY/PASTE FROM PORTAL"
$ cat file-with-an-array.json | jq -c '.[]' | xargs -n1 az storage message put -q "$QUEUE" --content
function c2Bot(){
var self = this,
spells = {},
potions = [],
mouseUpEvent = new MouseEvent("mouseup", {
bubbles: true,
cancelable: true,
view: window
})
;
@ryepup
ryepup / install-pygit2.sh
Created April 1, 2015 14:00
install pygit2 + libgit2 w/ SSH support on ubuntu
#!/bin/sh
sudo aptitude install pkg-config libssh2-1-dev libhttp-parser-dev libssl-dev libz-dev
wget https://github.com/libgit2/libgit2/archive/v0.22.0.tar.gz
tar xzf v0.22.0.tar.gz
cd libgit2-0.22.0/
cmake .
make
sudo make install
sudo pip install pygit2
@ryepup
ryepup / error.html
Created March 23, 2015 18:14
NoReverseMatch at /status
<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="NONE,NOARCHIVE">
<title>NoReverseMatch at /status</title>
<style type="text/css">
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * * { padding:0; }
body { font:small sans-serif; }
@ryepup
ryepup / my-remove-button.js
Last active August 29, 2015 14:15
meta directive
angular.module('my-app')
/**
* consistent UI for remove buttons
*/
.directive('myRemoveButton', function($compile) {
'use strict';
return {
restrict: 'A',
priority: 1000, // process this directive first
terminal: true, // stop compiling other directives on the
@ryepup
ryepup / dom-macros.js
Last active August 29, 2015 14:15
DOM macro directive
angular.module('my-app')
/**
* adds a glyphicon to the beginning or end of the element.
*
* usage: `<whatever my-glyphicon="heart">...</whatever>`
*
* add attribute `icon-position="after"` to put the icon at the end of
* the body.
*/
.directive('myGlyphicon', function() {
@ryepup
ryepup / my-component.html
Last active August 29, 2015 14:15
component directive
<div>
<pre>{{vm.ngModel|json}}</pre>
<button ng-click="vm.save()" ng-disabled="vm.saving">Save</button>
</div>
@ryepup
ryepup / rounding.sql
Created February 10, 2015 14:20
fun with rounding and data types
DECLARE @x money, @t money
SET @x = 15062.53
SET @t = 51679.61
SELECT
15062.53/51679.61,
-- 0.2914598233
@x / @t,