Skip to content

Instantly share code, notes, and snippets.

View managedkaos's full-sized avatar
💭
Time for some Actions! :D

Michael managedkaos

💭
Time for some Actions! :D
View GitHub Profile
@managedkaos
managedkaos / jenkins_on_docker.sh
Last active January 1, 2023 00:18
A `bash` function for running the Jenkins CI LTS image as a docker process.
function jenkinsondocker() {
if [ $(ps -elf | grep docker | wc -l) -gt 0 ];
then
if [ "$1" == "clean" ] || [ "$2" = "clean" ]; then
echo "# $(date) Removing any previously running Jenkins instances..."
echo Stopping $(docker stop jenkins 2>&1) | sed 's/Error response from daemon://'
echo Removing $(docker rm jenkins 2>&1) | sed 's/Error response from daemon://'
fi
docker pull jenkins/jenkins:lts
@managedkaos
managedkaos / humble-bundle-complete-aws-training-pluralsight.md
Created June 21, 2022 16:52
Humble Bundle for Complete AWS Training with Pluralsight

Image

Humble Software Bundle: Complete AWS Training

Learn the ins, outs, and myriad applications of Amazon Web Services (AWS) cloud computing from the experts at Pluralsight! The bundle of online courses will help train you up on databases, machine learning, networks, security, development, and more using one of the world’s most popular cloud computing services. Get the AWS knowledge you need, all while supporting Code.org and NPower!

Master AWS cloud tech with these courses

  • Understanding AWS Core Services
  • Analyzing Data on AWS

Ebedded Build Status (unprotected)

Type Badge
Markdown Build Status
HTML
@managedkaos
managedkaos / Dockerfile.nginx
Created January 29, 2022 19:00
A pretty basic Dockerfile for NGINX. It uses nginx as the base; does apt-get update and upgrade; and then installs vim.
FROM nginx
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y vim

01_04-composite-actions

Use these files to test a composite action.

  1. Create TWO new repos:
    • one to host the composite action
    • one to host the workflow that uses the action
  2. Upload the file action.yml into the root of the compsite action repo.
  3. Upload the following files into the root of the workflow repo:

main.py

@managedkaos
managedkaos / NOTES.md
Last active October 27, 2021 17:15
My schedule for GitHub Universe 2021

Repos

  • PR merge queue

Codepsaces

  • SSH into codespace from CLI using gh

Actions

Copilot

  • AI pair programmer for developers, built into the editor
@managedkaos
managedkaos / azlyrics.py
Created August 1, 2017 04:29
Scrape lyrics from azlyrics.com
import requests
from bs4 import BeautifulSoup
url = "http://www.azlyrics.com/lyrics/onyx/bacdafucup.html"
print "Default request (it will fail)..."
# make the default request
try:
r = requests.get(url)
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut velit eros, lobortis a sem et, semper imperdiet quam. Morbi vitae mauris congue, laoreet tortor et, tincidunt nunc. Vestibulum pulvinar, erat ut laoreet bibendum, nunc velit semper dui, non euismod enim risus vitae sapien. Vivamus ultrices consequat urna in commodo. Sed mattis, lectus vestibulum faucibus viverra, lacus orci lacinia erat, quis bibendum nisl libero a ipsum. Praesent mollis a mi non vestibulum. Duis vel arcu purus. Curabitur ornare tortor vel convallis efficitur. Donec tempus massa eget imperdiet cursus. Quisque purus leo, varius eget mollis eu, blandit vitae quam. Vivamus egestas interdum sollicitudin. In vitae nulla diam. Morbi ante leo, tristique eu rutrum in, tempus et justo.
Nunc sed massa magna. Quisque vestibulum cursus nisl vitae malesuada. Maecenas id neque eu quam facilisis vehicula. Cras tempus consectetur eros a lobortis. Nunc semper iaculis lectus. Quisque at nunc vel ligula eleifend posuere at eget ex. Vivamus varius maur
#!/usr/local/bin/python3
from datetime import date
import os, requests
start = date(2020, 12, 31)
today = date.today()
delta = today - start
if (delta.days < 101):
print("Today is day {}".format(delta.days))
"#<LambdaContext:0x000055e3817a4030 @clock_diff=1611091363834, @deadline_ms=1611091662175, @aws_request_id=\"ddd82629-22a9-4e2e-a84d-ad85b359e192\", @invoked_function_arn=\"arn:aws:lambda:us-east-1:388085464911:function:apimachine-staging\", @log_group_name=\"/aws/lambda/apimachine-staging\", @log_stream_name=\"2021/01/19/[$LATEST]a2b2b90da5d146b6a01531ae7cc035c1\", @function_name=\"apimachine-staging\", @memory_limit_in_mb=\"128\", @function_version=\"$LATEST\">"