if you're using fish shell, you can add this in your fish config:
let g:fzf_colors = {
\ 'fg': ['fg', 'Normal'],
\ 'bg': ['bg', 'Normal'],
# create a topic with specified partitons | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --create --partitions 2 --topic test-partitions | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --describe --topic test-partitions | |
# create a topic with default partitions | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --create --topic test-def-partitions | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --describe --topic test-def-partitions | |
# alter the number of partitions of an existing topic | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --alter --topic test-def-partitions --partitions 3 |
/* MIT License | |
Copyright (c) 2019-2020 Unlimiter | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
package main | |
import ( | |
"runtime" | |
"fmt" | |
"time" | |
) | |
func main() { | |
// Print our starting memory usage (should be around 0mb) |
package main | |
import ( | |
"github.com/go-redis/redis" | |
"github.com/jmoiron/sqlx" | |
_ "github.com/lib/pq" | |
"github.com/robfig/cron" | |
"github.com/sirupsen/logrus" | |
"time" | |
) |
It is a best practice to not have the CodeDeploy Agent baked into the AMI because AWS will update to new versions quite often. Once they deprecate a version, the AMI will stop being able to deploy new instances, therefore breaking the whole pipeline.
Instead, AWS recommends this CodeDeploy Agent install to be set as User Data
within the EC2 Launch Configuration. Because we use CodePipline, CodeDeploy, Auto Scaling Groups, and Load Balancers, we need to change many interlaced pieces.
# Puma can serve each request in a thread from an internal thread pool. | |
# The `threads` method setting takes two numbers: a minimum and maximum. | |
# Any libraries that use thread pools should be configured to match | |
# the maximum value specified for Puma. Default is set to 5 threads for minimum | |
# and maximum; this matches the default thread size of Active Record. | |
# More: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#threads | |
# | |
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } | |
threads threads_count, threads_count |
If you're here just for the section on vscode working with Python on WSL, jump here.
Windows is now a development environment that can compete with Mac and Linux. Windows Subsystems for Linux lets you have an Ubuntu (or other Linux flavor) installation that works near seemlessly inside of Windows. Hyper Terminal running WSL's Bash and Visual Studio Code feel really nice to code in. These are instructions for getting set up and smoothing out most of the remaining rough edges. I've included a section on getting vscode to work well with Python and WSL, but the general pattern should be usable for any unsupported language (as of now, I believe it's only Node.js that has WSL support in vscode).
tap "caskroom/cask" | |
cask "google-chrome" | |
cask "firefox" | |
brew "chromedriver" | |
brew "geckodriver" |
based on https://www.reddit.com/r/vim/comments/24g8r8/italics_in_terminal_vim_and_tmux/
$ echo -e "\e[3mitalic\e[23m"
$ infocmp $TERM | grep sitm
sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,