Skip to content

Instantly share code, notes, and snippets.

View drexler's full-sized avatar
💭
flipping bits...

andrew quartey drexler

💭
flipping bits...
View GitHub Profile
@drexler
drexler / gist:1f844a16ae25c38958315f4d0d2be28b
Created June 1, 2020 14:36
autoscaling_group_resource crash
panic: unknown value type in TypeMap bool
2020-06-01T10:19:04.988-0400 [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4.exe:
2020-06-01T10:19:04.988-0400 [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4.exe: goroutine 705 [running]:
2020-06-01T10:19:04.988-0400 [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.SerializeValueForHash(0xc0001e4a80, 0x4e45b60, 0xc000583350, 0xc000891cc0)
2020-06-01T10:19:04.988-0400 [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/serialize.go:61 +0x8d1
2020-06-01T10:19:04.988-0400 [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.HashSchema.func1(0x4e45b60, 0xc000583350, 0x1)
2020-06-01T10:19:04.988-0400 [DEBUG] plugin.terraform-provider-aws_v2.64.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d44
@drexler
drexler / install.sh
Created May 24, 2018 16:03
Install Chrome under WSL
# assumes you have ubuntu-desktop installed which includes stock libpulse
sudo add-apt-repository ppa:therealkenc/wsl-pulseaudio
sudo apt-get update && sudo apt-get upgrade
# Download the stable or development Chrome .deb package - dev if you want headless functionality
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt -f install # probably
wget https://github.com/therealkenc/libudev-stub/releases/download/v0.9.0/libudev-stub-0.9.0-WSL.deb
@drexler
drexler / PULL_REQUEST_TEMPLATE.md
Created May 9, 2018 01:20
Pull Request Template

What I implemented:

Closes #XXXXX

@drexler
drexler / presignedUrl.jsonc
Last active May 3, 2018 20:11
uploading strategies
// Option one: directly upload base64 encoded files
// Pros: one network trip
// Cons: large attachments might cause processing delays and eventual lambda timeout
POST /tenants/{tenantId}/uploads
{
"items": [
{
"filename": "someLogo",
"filenameWithExtension": "someLogo.ext",
@drexler
drexler / launch.json
Created April 27, 2018 00:30
Breakpoints ignored due to missing source maps
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Debug Project",
"url": "http://localhost:3000",
"sourceMaps": true,
"webRoot": "${workspaceFolder}",
@drexler
drexler / install.sh
Created April 17, 2018 01:28 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`

Background

While I'm learning how to use Nginx, I was instructed to update the server_names_hash_bucket_size (/etc/nginx/nginx.conf) value from 32 to 64, but I don't understand why should I increase the value to 64.

References

References that have been read so far:

@drexler
drexler / gist:463676e7c36de6ddb01ea798eb308df8
Last active February 8, 2018 15:33 — forked from leoapost/gist:4318441
Delete all remote branches, except master
# Replace REMOTE_NAME with your remote name (e.g. origin)
git branch -r | grep REMOTE_NAME/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push REMOTE_NAME :$line; done;
@drexler
drexler / .bashrc
Created December 2, 2017 14:58
Starting ssh-agent on shell loads
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}
@drexler
drexler / PropertyExistence.vm
Last active September 13, 2017 18:51
Test for a property existence in a velocity template
{
#set($flag = false)
#set($missing = "'""""'")
#if("'$input.json('$.aJsonField')'" != $missing)
"JsonFieldIsPresent": $input.json('$.aJsonField')
#set($flag = true)
#end
#if("'$input.json('$.aJsonField')'" == $missing)