Skip to content

Instantly share code, notes, and snippets.

View DaddyMoe's full-sized avatar

Moses Mansaray DaddyMoe

View GitHub Profile
@DaddyMoe
DaddyMoe / DailyDockerCommands.md
Last active December 21, 2020 13:36
Daily Docker Commands

Daily Docker Commands

Building custom containers

// Build from a `Dockerfile` in this directory `.` and tag the container as `getting-started`
docker build -t getting-started .

//Run container in the background `-d` with ports `-p` and tag = `getting-started`
docker run -dp 3000:3000 getting-started
@CommodoreBeard
CommodoreBeard / test-contributors.sh
Created August 20, 2018 11:35
Percent of Developers who Write Tests
#!/usr/bin/env bash
function getContributors() {
git ls-tree -r --name-only master $1 | while read file ; do
git log --follow --pretty=format:%an $file | sort | uniq
done | sort | uniq
return 0
}
allContributors=()
while read -r user; do
@chrisdarroch
chrisdarroch / idea
Created October 17, 2013 03:40
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@mattweber
mattweber / README.txt
Created March 1, 2012 04:09
ElasticSearch Multi-Select Faceting Example
This is an example how to perform multi-select faceting in ElasticSearch.
Selecting multiple values from the same facet will result in an OR filter between each of the values:
(facet1.value1 OR facet1.value2)
Faceting on more than one facet will result in an AND filter between each facet:
(facet1.value1 OR facet1.value2) AND (facet2.value1)
I have chosen to update the counts for each facet the selected value DOES NOT belong to since we are performing an AND between each facet. I have included an example that shows how to keep the counts if you don't want to do this (filter0.sh).