Skip to content

Instantly share code, notes, and snippets.

Curt Micol asenchi

  • Lansing, MI
Block or report user

Report or block asenchi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@asenchi
asenchi / Dockerfile
Created Oct 16, 2018 — forked from jpfuentes2/Dockerfile
dropping_the_d_in_ACID
View Dockerfile
FROM postgres:9.6-alpine
LABEL version="9.6"
LABEL author="jpfuentes2@gmail.com"
RUN apk update && apk upgrade --available
RUN apk add build-base git postgresql-dev
ENV POSTGRES_VERSION=9.6
@asenchi
asenchi / kubernetes_add_service_account_kubeconfig.sh
Created Jun 28, 2018 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
View kubernetes_add_service_account_kubeconfig.sh
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@asenchi
asenchi / nginx-elasticsearch-proxy.conf
Created Jun 25, 2018 — forked from abrudtkuhl/nginx-elasticsearch-proxy.conf
NGINX Reverse Proxy Authentication For Elasticsearch
View nginx-elasticsearch-proxy.conf
# Run me with:
#
# $ nginx -p /path/to/this/file/ -c nginx.conf
#
# All requests are then routed to authenticated user's index, so
#
# GET http://user:password@localhost/_search?q=*
#
# is rewritten to:
#
View aws_vpc.tf
# file name terraform/modules/aws_vpc/vpc.tf
# first create the VPC.
# Prefix resources with var.name so we can have many environments trivially
resource "aws_vpc" "mod" {
cidr_block = "${var.cidr}"
enable_dns_hostnames = "${var.enable_dns_hostnames}"
enable_dns_support = "${var.enable_dns_support}"
tags {
Name = "${var.env}_vpc"
@asenchi
asenchi / jessfraz.md
Created Apr 19, 2018 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
View keybase.md

Keybase proof

I hereby claim:

  • I am asenchi on github.
  • I am asenchi (https://keybase.io/asenchi) on keybase.
  • I have a public key ASA7x3jgDU46kd6ITI7xBCcKRBueQr8CB8IbwUDfKuJ3RQo

To claim this, I am signing this object:

@asenchi
asenchi / impact.md
Created Oct 20, 2017
How we impact the world around us
View impact.md

How we impact the world around us

We have lived with ourselves since we were born. We know what we are thinking, and we know where our words and actions are coming from. However, it is difficult to translate that to working with others. We might be entirely sincere, but the words, phrasing, or time at which we choose to comment are important and impact the translation of that sincerity. The same is true for the listener as well, they bring their situation to the conversation just as much as the speaker.

It has been painfully obvious to me, forever, that I have a strong, overly confident personality that I present with overtly terse speech in how I communicate. If you are reading this and thinking, "oh my gawd dude, you are a pain in the ass" then I would say you are fortunate not to have known me 20 years ago.

However, there are things I do consistently to ensure I'm not going beyond my position at work unnecessarily, or too aggressively. I say this because I suffer from wanting to just dive in and do th

View config.md

This sets up the environment that the scripts run in. I've found it to be the most flexible route as I don't have to do any complex config file formatting, and the environment becomes the config, which is easy to move around to different platforms (linux, BSD, Heroku, etc). Depending on what I am doing, I might also write a wrapper script that automatically sources the config and runs the script.

# config.sh                                                                    
KEY1="value"                                                                   
KEY2="value"                                                                   
TOPICAL_KEY3="value"                                                           
TOPICAL_KEY4="value"                                                           
                                                                               
export KEY1 KEY2 TOPICAL_KEY3 TOPICAL_KEY4
@asenchi
asenchi / schemas.rb
Last active Sep 20, 2017
Specifying schemas in Sequel 5 migrations
View schemas.rb
# -- How do I do this in Sequel?
# CREATE SCHEMA IF NOT EXISTS mine
# CREATE TABLE test (name text);
# in Sequel (old way)
Sequel.migration do
up do
run "CREATE SCHEMA IF NOT EXISTS mine;"
create_table(:mine__test) do
View gist:4cc6794bb4f52646904e09c8b836aa1f
• hvalvatn:~ asenchi$ vim bin/old.py
• hvalvatn:~ asenchi$ python bin/old.py
Traceback (most recent call last):
File "bin/old.py", line 21, in <module>
print main(sys.argv[1])
IndexError: list index out of range
• hvalvatn:~ asenchi$ python bin/old.py 07-22-1979
Traceback (most recent call last):
File "bin/old.py", line 21, in <module>
print main(sys.argv[1])
You can’t perform that action at this time.