I hereby claim:
- I am tquach on github.
- I am tquach (https://keybase.io/tquach) on keybase.
- I have a public key ASCdt-nLoyM3Bp6_6pI55cMKcrI_46ikeuyJ7xzTc8Zvgwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Find unused VPCs in AWS. If no ENI is returned, likely the VPC is unused.
aws ec2 describe-network-interfaces --filters 'Name=vpc-id,Values=vpc-abcd1234' --query 'NetworkInterfaces[*].NetworkInterfaceId' ? # List all key bindings
: # Enter the tmux command prompt
r # Force redraw of the attached client
c # Create a new window
! # Break the current pane out of the window.
% # Split the current pane into two, left and right
" # Split the current pane into two, top and bottom
| FROM ubuntu:latest | |
| # Download the deb from My Vertica portal and put in current directory. | |
| ENV VERTICA_CONSOLE vertica-console_7.1.1-0_amd64.deb | |
| RUN apt-get update -q -y && apt-get install -q -y \ | |
| curl \ | |
| gdb \ | |
| mcelog \ | |
| openssl \ |
| # Start all stopped Docker containers | |
| docker ps -a -f "status=exited" -q | xargs docker start | |
| docker rm -f $(docker ps -a -f "status=exited") | |
| # Remove all dangling Docker images | |
| docker images -f "dangling=true" -q | xargs docker rmi -f | |
| # Pull all NSQ images | |
| IMAGES=("nsqio/nsqadmin" "nsqio/nsqd" "nsqio/nsqlookupd"); for N in $IMAGES; do docker pull $N; done; |
| package inversions | |
| // SortAndCountInversions uses a divide and conquer approach to determine the number of inversion pairs in an integer array | |
| func SortAndCountInversions(a []int) (sorted []int, inversions int) { | |
| n := len(a) | |
| // Base case | |
| if n == 1 { | |
| return a, 0 | |
| } |
| package slices | |
| // Equal compares two slices of strings for equality in less than polynomial time worst case. | |
| func Equal(s1, s2 []string) bool { | |
| if len(s1) != len(s2) { | |
| return false | |
| } | |
| o := make(map[string]int) | |
| for _, x := range s1 { |
| { | |
| "indent_size": 4, | |
| "indent_char": " ", | |
| "indent_level": 0, | |
| "indent_with_tabs": false, | |
| "preserve_newlines": true, | |
| "max_preserve_newlines": 10, | |
| "jslint_happy": true, | |
| "brace_style": "collapse", | |
| "keep_array_indentation": false, |
| class CreatePersonScenario extends Simulation { | |
| val customFeeder = new Feeder[String] { | |
| import faker._ | |
| import scala.util.Random | |
| private val RNG = new Random | |
| private def randInt(a: Int, b: Int) = RNG.nextInt(b - a) + a |