Skip to content

Instantly share code, notes, and snippets.

export PROJECT_NAMESPACE=kindness
export CLUSTER_NAME=mccluster
CLIENT_PLATFORM ?= $(shell go env GOOS)
ifeq ($(CLIENT_PLATFORM),linux)
export CURRENT_HOST_IP=$(shell hostname -I | awk '{print $1; exit}' | cut -d ' ' -f 1)
else
export CURRENT_HOST_IP=$(shell ifconfig en0 | awk '/inet / {print $2; }' | cut -d ' ' -f 2)
endif
#!/bin/bash
set -euo pipefail
#######################################
# Arguments:
# - Password
#######################################
function hash_es_password() {
local ODES_PASS_PLAIN=$1
local ODES_DOCKER_UUID=$(docker run --rm -d amazon/opendistro-for-elasticsearch)
@MChorfa
MChorfa / porter-verify.sh
Last active April 17, 2020 13:06
porter-verify-instance-status
#!/usr/bin/env bash
set -euo pipefail
# USAGE: ./porter-verify.sh instanceStatus 'YOUR_BUNDLE_NAME'
function instanceStatus() {
# Define success constant
local STATUS_SUCCESS="SUCCESS"
# bundle name argument

Keybase proof

I hereby claim:

  • I am mchorfa on github.
  • I am chorfa (https://keybase.io/chorfa) on keybase.
  • I have a public key whose fingerprint is A541 521E C94A 22ED 414C 2061 784F 8D81 A652 38C5

To claim this, I am signing this object:

@MChorfa
MChorfa / gist:3605133
Created September 2, 2012 22:19 — forked from JeffreyWay/gist:3185773
PHP Installation Options
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-libxml-dir=/usr \
--with-openssl=/usr \
@MChorfa
MChorfa / gist:3484577
Created August 27, 2012 00:13 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@MChorfa
MChorfa / test1.js
Created August 21, 2012 02:40 — forked from jmblog/test1.js
Examples of shim config in RequireJS 2.0 - Backbone and underscore
require.config({
paths: {
underscore: '../underscore-min'
},
shim: {
underscore: {
exports: function() {
return _.noConflict();
}
}
@MChorfa
MChorfa / gist:2485287
Created April 25, 2012 01:36 — forked from efedorenko/gist:2028193
Function for alpha blending
// Turns out this function already exists in Sass: mix(fg, bg, %) (http://d.pr/mGqa)
// Alpha blending
@function blend($bg, $fg) {
$r: red($fg) * alpha($fg) + red($bg) * (1 - alpha($fg));
$g: green($fg) * alpha($fg) + green($bg) * (1 - alpha($fg));
$b: blue($fg) * alpha($fg) + blue($bg) * (1 - alpha($fg));