Skip to content

Instantly share code, notes, and snippets.

View IanVaughan's full-sized avatar
👯‍♀️
OMG

Ian Vaughan IanVaughan

👯‍♀️
OMG
View GitHub Profile
@IanVaughan
IanVaughan / timeout.ex
Last active September 25, 2022 19:57
elixir genserver timeouts
defmodule CallsProcessOnTimeout do
use GenServer
def start_link(opts) do
self() |> IO.inspect(label: "#{__MODULE__}.start_link")
GenServer.start_link(__MODULE__, opts, name: __MODULE__)
end
def init(opts) do
self() |> IO.inspect(label: "#{__MODULE__}.init returing :ok, pid")
@IanVaughan
IanVaughan / gist:c7f5bf6cea3be8615c3056fb06aa2a4d
Created March 18, 2020 14:13
rake db load fails using flipper
-----> Fetching heroku/ci-postgresql buildpack...
buildpack downloaded
-----> Fetching heroku/ci-redis buildpack...
buildpack downloaded
-----> Fetching heroku/ruby buildpack...
buildpack downloaded
-----> Fetching heroku/nodejs buildpack...
buildpack downloaded
-----> Postgresql app detected
@IanVaughan
IanVaughan / README.md
Created June 8, 2012 07:38
Trying to understand rbenv gemsets

rbenv gemsets

Versions

$ rbenv
rbenv 0.3.0

$ rbenv gemset
version 0.3.0

rbenv-gemset [command] [options]

@IanVaughan
IanVaughan / stash setup
Created March 19, 2016 14:11
Logstash setup
From https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04
# ELK Server
## Install Java 8
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java8-installer
ccloud kafka topic create --partitions 1 test-topic

ccloud kafka topic produce test-topic --value-format avro --schema /path/to/schema.json
{"myField":"test","myField2":1}
{"myField":"foo","myField2":2}

Finish Getting Started with Schema Registry

#!/bin/bash
# Dont allow commits containing the addition of '@wip'
if test "$(git diff --cached | grep '\+\s*@wip')"
then
echo "Error: Attempt to commit an @wip line"
echo
echo "To skip this check, add the --no-verify option"
echo
exit 1
fi
2021-07-29T11:29:38.0007456Z ##[group]Starting datadog-agent service container
2021-07-29T11:29:38.0009102Z ##[command]/usr/bin/docker pull datadog/agent:latest
2021-07-29T11:29:39.4210209Z latest: Pulling from datadog/agent
2021-07-29T11:29:39.7656448Z 1127acbecdf7: Pulling fs layer
2021-07-29T11:29:41.8115266Z 1127acbecdf7: Verifying Checksum
2021-07-29T11:29:41.8115918Z 1127acbecdf7: Download complete
2021-07-29T11:29:50.9679094Z 1127acbecdf7: Pull complete
2021-07-29T11:29:50.9742704Z Digest: sha256:da43df11da9f6052d1a8691c87c5b1df60e79352f94c4ed7a53465e1a51dac04
2021-07-29T11:29:50.9761841Z Status: Downloaded newer image for datadog/agent:latest
2021-07-29T11:29:50.9798695Z docker.io/datadog/agent:latest
@IanVaughan
IanVaughan / diff-creds
Last active June 25, 2021 15:04
Show difference in rails creditials
#!/usr/bin/env bash
# Usage:
# diff-creds production
git checkout master --quiet
printf .
rails credentials:show --environment $1 > /tmp/prod
printf .
git checkout - --quiet
printf .
@IanVaughan
IanVaughan / output
Created February 28, 2012 12:10
brew install gpg
$ brew doctor
Your system is raring to brew.
$ brew update
Already up-to-date.
$ brew install -v gpg
==> Downloading ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.12.tar.bz2
File already downloaded in /Users/ivaughan/Library/Caches/Homebrew
/usr/bin/tar xf /Users/ivaughan/Library/Caches/Homebrew/gnupg-1.4.12.tar.bz2
2021-06-08T11:59:41.3519967Z ##[section]Starting: Request a runner to run this job
2021-06-08T11:59:42.1598461Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest'
2021-06-08T11:59:42.1598552Z Can't find any online and idle self-hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2021-06-08T11:59:42.1598921Z Found online and idle hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2021-06-08T11:59:42.3122458Z ##[section]Finishing: Request a runner to run this job
2021-06-08T11:59:51.7098919Z Current runner version: '2.278.0'
2021-06-08T11:59:51.7127239Z ##[group]Operating System
2021-06-08T11:59:51.7128229Z Ubuntu
2021-06-08T11:59:51.7128778Z 20.04.2
2021-06-08T11:59:51.7129289Z LTS