Skip to content

Instantly share code, notes, and snippets.

View ralph-tice's full-sized avatar

Ralph Tice ralph-tice

  • Kentik
  • Texas
View GitHub Profile
@ralph-tice
ralph-tice / gist:8c229ad491261d23cdc0c076201ec471
Created January 23, 2018 01:22
amazon linux kernel notes -- aufs support
# launched with 100gb gp2
aws ec2 run-instances --instance-type c4.xlarge --key-name ralph.tice --image-id ami-8da458e6 --subnet-id subnet-880a3fb2 --security-group-ids sg-ff2f1f9b --block-device-mappings "[{\"DeviceName\":\"/dev/xvda\",\"Ebs\":{\"DeleteOnTermination\":true,\"SnapshotId\":\"snap-f6edf1be\",\"VolumeSize\":100,\"VolumeType\":\"gp2\"}}]"
https://forums.aws.amazon.com/thread.jspa?messageID=628676&#628676
sudo bash
/usr/bin/get_reference_source -p kernel-$(uname -r)
/usr/sbin/useradd mockbuild
@ralph-tice
ralph-tice / README.md
Last active November 21, 2017 02:46 — forked from ningsuhen/README.md
Solarized Light Theme for CoderPad.io - inject the css via Chrome without browser extension

Many companies use coderpad.io for interviews and if you have eye strain with the monokai theme (dark background), you can change the theme on your browser by injecting the css.

##Installation Open coderpad.io editor and inject contents of the style.css above. Open inspect via right click and edit the body block as HTML, then paste in the contents of style.html as its own element inside

@ralph-tice
ralph-tice / keybase.md
Created October 2, 2017 09:28
Keybase proof

Keybase proof

I hereby claim:

  • I am ralph-tice on github.
  • I am gazarsgo (https://keybase.io/gazarsgo) on keybase.
  • I have a public key ASBHl_ZAboO_cf-Y6BZ33N3o6UOIxpwT6E33ZwkiyI8O2wo

To claim this, I am signing this object:

@ralph-tice
ralph-tice / gist:43dfb1ecc8fbc38b8b040fa68a0d32ce
Created July 16, 2017 19:06
docker pull concurrency triage from 2015-07
amazon linux kernel notes -- aufs support -- docker pull concurrency problem
# first hint of a custom AMI for ECS
# https://forums.aws.amazon.com/ann.jspa?annID=2805
# launched with 100gb gp2
aws ec2 run-instances --instance-type c4.xlarge --key-name ralph.tice --image-id ami-8da458e6 --subnet-id subnet-880a3fb2 --security-group-ids sg-ff2f1f9b --block-device-mappings "[{\"DeviceName\":\"/dev/xvda\",\"Ebs\":{\"DeleteOnTermination\":true,\"SnapshotId\":\"snap-f6edf1be\",\"VolumeSize\":100,\"VolumeType\":\"gp2\"}}]"
https://forums.aws.amazon.com/thread.jspa?messageID=628676&#628676
@ralph-tice
ralph-tice / input.json
Last active January 11, 2017 09:23
updating a json array via jq
{ "arr" : [
{ "id": 3, "bar": "x", "fum": 3.14 },
{ "id": 77, "bar": "y", "fum": 0 },
{ "id": 9, "bar": "z", "fum": -1 }
]
}
@ralph-tice
ralph-tice / keybase.md
Created September 12, 2016 16:05
keybase.md

Keybase proof

I hereby claim:

  • I am ralph-tice on github.
  • I am ralphtice (https://keybase.io/ralphtice) on keybase.
  • I have a public key whose fingerprint is 2ECB 5DF5 33D2 9F96 3BDD 481D 6DF6 0952 9EC9 7B31

To claim this, I am signing this object:

env.GIT_PROJECT = "thisgroup/thisproject"
env.INCLUDE_MERGES = true
// TODO: have team decide where and how much they want to receive slack notifications
//env.SLACK_ROOM = "alerts"
stage 'Init'
lib = node('swarm') {
git url: 'git@ourgithost:infra/CI.git', branch: 'develop'
load 'pipelines/gitlab_v1.groovy'
}
@ralph-tice
ralph-tice / TiceTest.md
Last active May 18, 2016 16:57
The Tice Test

Questions I expect companies I want to work at to get 12/12 yeses:

  1. Does each team own their production stack and manage their own on-call rotation?

  2. Is all code within the organization available to all developers?

  3. Can a new developer onboard and ship to production on their first day?

  4. Is there a well-defined process for making internal projects open source?

@ralph-tice
ralph-tice / gist:bc8f66c4fe1d4238ce54c54272fc4ba2
Last active April 1, 2020 10:03
Resizing a Kafka cluster via bash
#!/bin/bash -xe
# requires jq and 3 brokers to start
which jq || echo 'no jq found, bye!' && exit 1
ZK_HOST=zkhost1:2181/kafka
# record all topics
/usr/local/kafka/bin/kafka-topics.sh --zookeeper $ZK_HOST --list > all_topics
# generate json for listing which topics to reassign
[program:kafka]
command = /usr/local/kafka/bin/kafka-run-class.sh -name kafkaServer -loggc kafka.Kafka /usr/local/kafka/config/server.properties
stopwaitsecs = 60
redirect_stderr = true
stdout_logfile = /var/log/kafka/kafka-stdout.log
stdout_logfile_maxbytes = 0
stdout_logfile_backups = 0
stopasgroup=true
environment =
JAVA_HOME="/usr/java/default",