Skip to content

Instantly share code, notes, and snippets.

View jackishere's full-sized avatar
😀
Having fun

Jack Louvton jackishere

😀
Having fun
View GitHub Profile
# Source: https://gist.github.com/vfarcic/e79daf07ecdcb627e819b61aa851462d
#########################################################
# ow to Earn Billions With AI, ChatGPT, and Kubernetes? #
# https://youtu.be/1ak_O5HgKcM #
#########################################################
# Additional Info:
# - Cast AI: https://cast.ai/devopstoolkit
@nicerobot
nicerobot / chrome-launcher.sh
Last active August 26, 2021 01:07
Open URLs based on contents of a Chrome bookmarks-folder
#!/bin/bash
folder="${1:-open}"
profile="${2:-Default}"
jq -r \
'.roots.bookmark_bar.children[] | select(.name == "'"${folder}"'") .children[].url' \
"${HOME}/Library/Application Support/Google/Chrome/${profile}/Bookmarks" \
| while read url; do
open "${url}"
done
@aramse
aramse / gist:6eb4a5b11269bb19d9ad35bb21ace6f6
Last active February 8, 2023 07:12
Useful kubectl commands
# Run a container with the AWS CLI on a specific node:
kubectl run -it debug --image amazon/aws-cli --command bash --overrides='{ "apiVersion": "apps/v1beta1", "spec": { "template": { "spec": { "nodeSelector": { "kubernetes.io/hostname": "<node-name>" } } } } }'
# Configure KIAM role:
kubectl run -it debug --image amazon/aws-cli --overrides='{"spec": {"template": {"metadata": {"annotations": {"iam.amazonaws.com/role": "my-cool-role"}}}}}' -- bash
@ciiqr
ciiqr / dispatch.sh
Last active September 2, 2024 21:14
github actions, repository_dispatch with client_payload
# TODO: replace :token, :user, and :repo
curl -H "Authorization: token :token" \
-H 'Accept: application/vnd.github.everest-preview+json' \
"https://api.github.com/repos/:user/:repo/dispatches" \
-d '{"event_type": "awesomeness", "client_payload": {"foo": "bar"}}'
@npearce
npearce / install-docker.md
Last active September 5, 2024 17:58
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@codeinthehole
codeinthehole / .vimrc
Last active April 13, 2021 13:47
~/.vimrc
" ============= " VIMRC file for David Winterbottom (@codeinthehole) " ===========
" Inspiration {{{
" -----------
" Videos:
" - http://www.youtube.com/watch?v=aHm36-na4-4
"
" Articles:
"
" - http://alexpounds.com/blog/2014/06/06/the-vimrc-antiques-roadshow
@gilrosenthal
gilrosenthal / Fast.ai install script
Created July 4, 2018 20:14
Fast.ai Install on Google Colab
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
@riandyrn
riandyrn / self_signed_ssl_aws_alb.md
Last active July 25, 2024 05:10
Self Signed SSL Certificate for AWS Application Load Balancer

Self Signed SSL Certificate for AWS ALB

  1. Generate private key

    $> openssl genrsa 2048 > my-private-key.pem
  2. Generate certificate using private key, you will be prompted to fill some fields. Fill required fields randomly, except for Common Name fill it with *.amazonaws.com or your valid domain name

@ksmithut
ksmithut / .dockerignore
Last active June 2, 2024 21:43
Node Docker Compose nodemon
node_modules