Skip to content

Instantly share code, notes, and snippets.

View nickmarden's full-sized avatar

Nick Marden nickmarden

View GitHub Profile
cluster.name: travis
node.name: travis-node
node.max_local_storage_nodes: 1
index.number_of_shards: 1
index.number_of_replicas: 0
index.mapper.dynamic: true
action.auto_create_index: true
action.disable_delete_all_indices: true
path.conf: __HOME__/elasticsearch
path.data: __HOME__/elasticsearch/data
test:
endpoint: http://localhost:9201
#!/bin/bash -x
rm -fr $HOME/elasticsearch
mkdir -p $HOME/elasticsearch
mkdir -p $HOME/elasticsearch/data
mkdir -p $HOME/elasticsearch/logs
cp -p config/travis/elasticsearch-client.yml config/elasticsearch.yml
cat config/elasticsearch.yml
sed "s#__HOME__#$HOME#g;" config/travis/elasticsearch-server.yml > $HOME/elasticsearch/elasticsearch.yml
cat $HOME/elasticsearch/elasticsearch.yml
sed "s#__HOME__#$HOME#g;" config/travis/elasticsearch.sh > $HOME/elasticsearch/elasticsearch.sh
@nickmarden
nickmarden / senior_eng_skills_test.md
Last active December 19, 2020 12:49
Rapid River Software senior engineer position skills test
  1. Voting

Each voter can vote in zero or more referenda. Each referendum has one or more questions, and each question is a yes/no vote. Write the simplest normalized schema to describe this in generic SQL statements or as an entity-relationship diagram. Point out where the indexes would be if you want to quickly know the results of a given referendum question, but you never expect to query a single voter's voting record.

  1. Availability on AWS

Your client plans to host their web application on AWS. When would you advise (a) deployment in a single availability zone, (b) deployment in multiple availability zones in a single region (c) deployment in multiple regions? What operational difficulty or complexity, if any, is added as you go from (a) to (b) to (c)?

# Copyright (c) 2013, StrongLoop, Inc. <[email protected]>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
nginx:
pkg:
- installed
nginx-config:
file:
- managed
- name: /etc/nginx/nginx.conf
- source: salt://conf/nginx/nginx.conf
- user: nginx
include:
- nginx
# ...
jenkins-http-proxy:
file:
- managed
- template: jinja
- name: /etc/nginx/conf.d/nginx-proxy-jenkins.conf
@nickmarden
nickmarden / nginx_init.sls
Created September 29, 2014 23:31
My nginx state file
nginx:
pkg:
- installed
nginx-config:
file:
- managed
- name: /etc/nginx/nginx.conf
- source: salt://conf/nginx/nginx.conf
- user: nginx

Keybase proof

I hereby claim:

  • I am nickmarden on github.
  • I am nick_marden (https://keybase.io/nick_marden) on keybase.
  • I have a public key whose fingerprint is 3663 55B8 098A 711C 350F 8549 8D82 F04B C7A0 B5D1

To claim this, I am signing this object:

[2012-11-19T18:16:09+00:00] INFO: *** Chef 10.14.4 ***
[2012-11-19T18:16:16+00:00] INFO: Run List is [recipe[xfs], role[gsfn_auth_prod], role[volumes]...
...
Breakpoint 1 at /var/chef/cache/cookbooks/gsfn_mysql/recipes/custom.rb:168
/var/chef/cache/cookbooks/gsfn_mysql/recipes/custom.rb:168
route53_rr "sql-#{node['gsfn']['mysql']['serverid']}" do
(rdb:1) list
[163, 172] in /var/chef/cache/cookbooks/gsfn_mysql/recipes/custom.rb
163 execute "lower swappiness threshold" do
164 command "echo 0 > /proc/sys/vm/swappiness"