Skip to content

Instantly share code, notes, and snippets.

View sblack4's full-sized avatar
:shipit:
taking care of business

Steven B sblack4

:shipit:
taking care of business
View GitHub Profile
@sblack4
sblack4 / Install-AWSCLIV2.ps1
Created May 10, 2024 16:00 — forked from dansmith65/Install-AWSCLIV2.ps1
Install version 2 of AWS CLI via PowerShell
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
$dlurl = "https://awscli.amazonaws.com/AWSCLIV2.msi"
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf)
$ProgressPreference = 'SilentlyContinue'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest $dlurl -OutFile $installerPath
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait
Remove-Item $installerPath
$env:Path += ";C:\Program Files\Amazon\AWSCLIV2"
@sblack4
sblack4 / ecs-run
Last active April 15, 2024 17:36 — forked from vcastellm/ecs-run
Run task and wait for result in AWS ECS
#!/usr/bin/env bash
set -e
function usage() {
set -e
cat <<EOM
##### ecs-run #####
Simple script for running tasks on Amazon Elastic Container Service
One of the following is required:
Required arguments:
@sblack4
sblack4 / save-sqs-queue.py
Last active August 26, 2021 15:33 — forked from fabiob/save-sqs-queue.py
Saves all messages from an AWS SQS queue into a folder, messages are TXT or JSON
#!/usr/bin/env python3
import argparse
import boto3
import json
import os
from datetime import datetime
parser = argparse.ArgumentParser(
@sblack4
sblack4 / 01PostgreSQLSnippets.md
Last active August 13, 2020 17:15 — forked from DominikSerafin/01PostgreSQLSnippets.md
PostgreSQL Snippets
@sblack4
sblack4 / example.md
Last active February 9, 2021 14:26 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@sblack4
sblack4 / gist:529a7eae93f4cc0b3cc3335db12c159c
Created July 23, 2019 18:41 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sblack4
sblack4 / .gitignore
Created October 23, 2018 01:44 — forked from lpincus/sum_of_distances.csv
league of legends API
.idea
@sblack4
sblack4 / gist:0f083a798f6dfd40640a62162785c2cb
Last active May 31, 2018 04:54 — forked from nathanlong/gist:bc1d4923982ad45e9379
Local Servers from the Command Line
# Drop these functions into your ~/.bashrc or ~/.bash_profile, wherever you keep your bashy goodness.
# Usage: cd to directory you want to serve up, fire one of these commands, navigate to http://0.0.0.0:{port number here}
# Start an HTTP server from a directory, optionally specifying the port
function serverpy() {
local port="${1:-8000}"
open "http://localhost:${port}/"
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
# And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files)
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
@sblack4
sblack4 / CATCH_Keras_RL.md
Created April 11, 2018 20:43 — forked from EderSantana/CATCH_Keras_RL.md
Keras plays catch - a single file Reinforcement Learning example
@sblack4
sblack4 / ambari_api_bulk_service_checks.md
Created October 20, 2017 14:56 — forked from mr-jstraub/ambari_api_bulk_service_checks.md
Ambari API - Run all Service Checks

#Ambari API - Run all Service Checks In order to check the status and stability of your cluster it makes sense to run the service checks that are included in Ambari. Usually each Ambari Service provides its own service check, but their might be services that wont include any service check at all. To run a service check you have to select the service (e.g. HDFS) in Ambari and click "Run Service Check" in the "Actions" dropdown menu.

Service Checks can be started via the Ambari API and it is also possible to start all available service checks with a single API command. To bulk run these checks it is necessary to use the same API/method that is used to trigger a rolling restart of Datanodes (request_schedules). The "request_schedules" API starts all defined commands in the specified order, its even possible to specify a pause between the commands.

Available Service Checks:

Service Name service_name Command
HDFS HDFS HDFS_SERVICE_CHECK