Skip to content

Instantly share code, notes, and snippets.

View sboorlagadda's full-sized avatar

Sai Boorlagadda sboorlagadda

View GitHub Profile
@sboorlagadda
sboorlagadda / set-hostname.sh
Created April 12, 2019 21:00
Why is my hostname resolution taking so long?
I was able to fix this issue by explicitly setting the HostName using scutil to be the same value as LocalHostName:
$ scutil --set HostName $(scutil --get LocalHostName)
Now:
$ sudo scutil --set HostName MacBook-Pro
$ time python -c 'import socket; print(socket.getfqdn())'
MacBook-Pro
python -c 'import socket; print(socket.getfqdn())' 0.01s user 0.00s system 86% cpu 0.016 total
I was confused before because of the following:
@sboorlagadda
sboorlagadda / 1_kubernetes_on_macOS.md
Created January 22, 2019 07:51 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@sboorlagadda
sboorlagadda / gist:c7a66de11b29342c854adb3f61da8fcf
Created June 25, 2018 00:47 — forked from lxneng/gist:741932
install PostgreSQL 9 in Mac OSX via Homebrew
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
@sboorlagadda
sboorlagadda / amazon-linux-x11-instr.txt
Last active June 21, 2018 15:06 — forked from lashex/amazon-linux-x11-instr.txt
Getting Amazon Linux working with X11
# These instructions assume you are using a Linux or Mac machine as
# the “local” machine and an Amazon Linux as the “remote” machine.
# Here’s one way to get X11 working between the two.
# on the local machine (Linux or Mac with X11 already installed)
$ ssh -X -i <amazon_key.pem> ec2-user@<remote_ec2_box_name>
# then on the remote Amazon Linux EC2 box
$ sudo yum install xauth
$ sudo yum install xterm
apm install atom-beautify prettier-atom editorconfig file-icons highlight-selected local-history project-manager atom-wrap-in-tag atom-ternjs autoclose-html autocomplete-modules color-picker docblockr emmet emmet-jsx-css-modules es6-javascript js-hyperclick hyperclick pigments lodash-snippets language-babel react-es7-snippets atom-jest-snippets auto-detect-indentation autoclose language-babel busy-signal intentions linter linter-csslint linter-htmlhint linter-jshint linter-eslint linter-ui-default minimap
@sboorlagadda
sboorlagadda / vim_fix.sh
Created June 16, 2017 18:03
VIM - YouCompleteMe fix
sudo add-apt-repository ppa:jonathonf/vim
sudo apt-get update && sudo apt-get upgrade
It these commands don't work above.
You have to use
apt-get -u dist-upgrade
@sboorlagadda
sboorlagadda / README.md
Created June 22, 2016 19:41 — forked from juno/README.md
Install rbenv and ruby-build to Amazon Linux (cloud-init).

Install rbenv and ruby-build to Amazon Linux (cloud-init).

  1. Copy & paste content of user-data.sh to EC2 RunInstances user-data
  2. Then, logging in to EC2 instance as ec2-user and run install-ruby.sh.
@sboorlagadda
sboorlagadda / docker-any-user.md
Last active January 22, 2019 09:58
How can I use docker without sudo?
  1. Add the docker group if it doesn't already exist:
    sudo groupadd docker
  1. Add the connected user "${USER}" to the docker group. Change the user name to match your preferred user:
sudo gpasswd -a ${USER} docker