Skip to content

Instantly share code, notes, and snippets.

View jstangroome's full-sized avatar

Jason Stangroome jstangroome

View GitHub Profile
@jstangroome
jstangroome / Dockerfile
Last active March 23, 2021 18:23
golang:1.10 docker image and /go/src/app
# From example at https://github.com/docker-library/docs/blob/9ed50c57d5fa14e634d909c8c6a1583605e044f3/golang/content.md#start-a-go-instance-in-your-app
FROM golang:1.10
WORKDIR /go/src/app
COPY . .
RUN go get -d -v ./...
RUN go install -v ./...
$ a=; unset b; echo -e "\na- => ${a-nope}\na:- => ${a:-nope}\nb- => ${b-nope}\nb:- => ${b:-nope}"
a- =>
a:- => nope
b- => nope
b:- => nope
@jstangroome
jstangroome / 99-gce.conf
Created August 16, 2017 10:13
/etc/sysctl.d/99-gce.conf from Google Compute Engine source image ubuntu-1604-xenial-v20170811
# Requirements from Google. Documented at:
# https://developers.google.com/compute/docs/images#buildingimage
# Prevent users from allocating low virtual memory
vm.mmap_min_addr = 65536
# enables syn flood protection
net.ipv4.tcp_syncookies = 1
# ignores source-routed packets
@jstangroome
jstangroome / 2017-06-02.desktop.production.log
Created June 2, 2017 01:36
GitHub Desktop in a tight loop of death after running GitHubDesktopSetup.exe and seeing splash screen
2017-06-02T01:27:08.469Z - error: Error: Cannot find module '../screen'
at Module._resolveFilename (module.js:470:15)
at Function.Module._resolveFilename (C:\Users\jason\AppData\Local\GitHubDesktop\app-0.5.9\resources\electron.asar\common\reset-search-paths.js:35:12)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.get [as screen] (C:\Users\jason\AppData\Local\GitHubDesktop\app-0.5.9\resources\electron.asar\browser\api\exports\electron.js:11:16)
at o.exports (C:\Users\jason\AppData\Local\SquirrelTemp\webpack:\app\~\electron-window-state\index.js:19:1)
at new T (C:\Users\jason\AppData\Local\SquirrelTemp\webpack:\app\src\main-process\app-window.ts:42:13)
at S (C:\Users\jason\AppData\Local\SquirrelTemp\webpack:\app\src\main-process\main.ts:294:18)
@jstangroome
jstangroome / a-repro.sh
Created April 29, 2016 07:27
filebeat 1.2.2 reships rotated log files on restart due to omitted offset in registry
#!/usr/bin/env bash
set -o errexit -o xtrace
trap "echo Exited with \$?" EXIT
# confirm filebeat version
filebeat --version | grep --fixed-strings 1.2.2
# init workspace
mkdir --parents /tmp/filebeat-issue-repro/
@jstangroome
jstangroome / console.log
Last active March 30, 2016 03:22
Filebeat 1.1.2 does not persist correct inode for rotated logs on exit
+ trap 'echo Exited with $?' EXIT
+ filebeat --version
+ grep --fixed-strings 1.1.2
filebeat version 1.1.2 (amd64)
+ sleep_duration_seconds=10
++ dirname /vagrant/filebeat-issue-repro.sh
+ conf_file=/vagrant/filebeat-issue-repro.yml
+ mkdir --parents /tmp/filebeat-issue-repro/
+ cd /tmp/filebeat-issue-repro/
+ rm --force ./input ./input.1 ./registry ./shipped
+ trap 'echo Exited with $?' EXIT
+ filebeat --version
s 1.1.2
filebeat version 1.1.2 (amd64)
++ dirname /vagrant/filebeat-issue-repro.sh
+ conf_file=/vagrant/filebeat-issue-repro.yml
+ mkdir --parents /tmp/filebeat-issue-repro/
+ cd /tmp/filebeat-issue-repro/
+ rm --force ./input ./input.1 ./registry ./shipped
+ echo entry1
@jstangroome
jstangroome / packages.log
Created March 14, 2016 05:52
Default packages on ami-6c14310f (ubuntu-trusty-14.04-amd64-server-20160114.5)
$ dpkg --get-selections
accountsservice install
acpid install
adduser install
apparmor install
apport install
apport-symptoms install
apt install
apt-transport-https install
apt-utils install