? # 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
object BuildSettings { | |
lazy val buildName = "demo" | |
lazy val buildOrganization = "com.poprocksoftware" | |
lazy val buildScalaVersion = "2.10.2" | |
} | |
object Dependencies { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ |
# 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'
OlderNewer