Use the following commands to add the kubectl autocomplete to zsh:
mkdir -p ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/
kubectl completion zsh > ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/kubectl-autocomplete.plugin.zsh| var USERS = { | |
| protecteddir: [{ | |
| username: 'user', | |
| password: 'pass', | |
| }], | |
| }; | |
| //Response when auth is not valid. | |
| var response401 = { | |
| statusCode: 401, |
| 'use strict'; | |
| exports.handler = (event, context, callback) => { | |
| // Get request and request headers | |
| const request = event.Records[0].cf.request; | |
| const headers = request.headers; | |
| // Configure authentication | |
| const authUser = 'user'; | |
| const authPass = 'pass'; |
If you are setting up nginx,chances are you will discover your worker_connections is at some low number, such as 1024.
You can’t increase this number unless you increase kernel limit as well.
First of all run cat /proc/sys/fs/file-max to discover your maximum limit.
abc@ubuntu:~$ cat /proc/sys/fs/file-max
1048576
abc@ubuntu:~$ ulimit -n
1024
| # This file actually fires up multiple sidekiq services. | |
| # to start: systemctl start sidekiq.target | |
| # | |
| [Unit] | |
| Description=Fire up up to 6 sidekiqs | |
| # If you want more than 6 processes, append sidekiq@7.service, sidekiq@8.service, etc. to the ExecStart line below | |
| # Note that only as many as have been enabled will actually start. | |
| # Note also that the Unit data for each sidekiq process is in /lib/systemd/system/sidekiq@.service | |
| [Service] |
| #! /usr/bin/env bash | |
| set -e | |
| eval "$(rbenv init -)" | |
| for version in `rbenv whence gem`; do | |
| rbenv shell "$version" | |
| echo "Updating rubygems for $version" | |
| gem update --system --no-document --quiet |
| # | |
| # A: | |
| # pubsub = PgPubSub.new('channelname') | |
| # pubsub.subscribe do |data| | |
| # puts "data: #{data} is coming!" | |
| # end | |
| # | |
| # B: | |
| # pubsub = PgPubSub.new('channelname') | |
| # pubsub.publish("hello world") |