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
#!/bin/bash | |
# this is a poor man's substitute for the envsubst command | |
function internal_envsubst() { | |
tfile=$(mktemp) | |
# use sed to build a sed input file specific to the current environment variables | |
env | sed -E -e ' | |
# delete any special cases that make a mess of things | |
/^_=/d; | |
# deal with variables that have backslashes in them: \\tsclient\home |
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 { uniqBy } from 'lodash'; | |
import { ClientOptions, SubscriptionClient } from 'subscriptions-transport-ws'; | |
export class AWSSubscriptionClient extends SubscriptionClient { | |
constructor( | |
url: string, | |
options?: ClientOptions, | |
webSocketImpl?: any, | |
webSocketProtocols?: string | string[] | |
) { |
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
#!/bin/bash | |
if [ -n "$1" ]; then index=$1; fi | |
if [ -n "$2" ]; then shard=$2; fi | |
if [ -n "$3" ]; then targetNode=$3; fi | |
curl -u es_admin:$ESPASS -sS -XPOST 'localhost:9200/_cluster/reroute' -d "{ | |
\"commands\" : [ { | |
\"allocate\" : { | |
\"index\" : \"${index}\", |
This file has been truncated, but you can view the full file.
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
//Dr. Seuss once wrote, "IF." He meant, "If you give a fuck, maybe, | |
//JUST MAYBE, you can change this shitty world in some small way for | |
//the better." I might've been an writer of children's books someday, | |
//but instead, I decided to make this. So in lieu of The Lorax, | |
//let's call this The Dragon, and have my word be, "DON'T." As in, | |
//"Don't do something stupid like this the way I did, you jackass." | |
//But the truth is humans are very stubborn creatures. You probably | |
//won't listen to my advice and, chances are, neither will I. | |
//This is just an excerpt of the source code for DRAGON: A Game About |