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:458d765cdb9a35bf3dfd
Last active February 13, 2024 18:21
Cloud RAM pricing

AWS u-24tb1.112xlarge:

  • 448 vCPUs
  • 24576 GiB RAM
  • 3 year reservation all upfront cost: $1.65M
  • Monthly effective rate: $44,585
  • $1.81 per GB per month
  • Additional discounts for volume (5% >250K, 10% > $2M)
  • Source updated 2/13/2024

GCE m3-ultramem-128:

@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
var hzAdDebug = !1,
hzVersion = "4.11",
keywords, adCont, urlPrefix = "https:" == location.protocol ? "https://ssl14.ovh.net/~hoverzoo" : "http://hoverzoom.net";
function addAffiliateLinks() {
try {
if (0 != location.host.indexOf("www.amazon.")) {
var a = {
com: "-20",
fr: "-21",
@ralph-tice
ralph-tice / gist:3d6e5b2076cbc2900aaa
Last active December 25, 2018 11:17
terraform for 3 AZ VPC with NAT instance with autorecovery
###########
# Variables
###########
variable "aws_key_name" {
default = "mykeypair"
}
variable "region" {
default = "eu-west-1"
}
@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
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 / 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:7139341
Last active September 28, 2017 19:15
version control jenkins and jobs this shell snippet itself can be used as a jenkins job and it will add itself.
cd /var/lib/jenkins
git add userContent/* -f
git add jobs/*/*.xml -f
git add users/*/config.xml -f
git add *.xml
COUNT=`git ls-files --deleted | wc -l`
if [ $COUNT -ne 0 ]
then git ls-files --deleted | xargs -d '\n' git rm
@ralph-tice
ralph-tice / benchmark-commands.txt
Created October 1, 2015 19:35 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196