Skip to content

Instantly share code, notes, and snippets.

View sammcj's full-sized avatar
🦃

Sam sammcj

🦃
View GitHub Profile
@sammcj
sammcj / vram.rb
Created August 1, 2024 22:06 — forked from jrruethe/vram.rb
Calculate VRAM requirements for LLM models
#!/usr/bin/env ruby
# https://asmirnov.xyz/vram
# https://vram.asmirnov.xyz
require "fileutils"
require "json"
require "open-uri"
# https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator/blob/main/index.html
@sammcj
sammcj / operations.graphql
Created November 15, 2022 23:57 — forked from duboisf/operations.graphql
Add branch protection to a repo using GitHub's Graphql API
fragment branchProtection on BranchProtectionRule {
allowsDeletions
allowsForcePushes
creator {
login
}
id
isAdminEnforced
requiredStatusCheckContexts
requiredApprovingReviewCount
@sammcj
sammcj / github-actions-notes.md
Last active April 25, 2023 20:10 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions
! https://raw.githubusercontent.com/arosh/ublacklist-github-translation/master/uBlacklist.txt
! Github fake
*://bleepcoder.com/*
*://githubja.com/*
*://*.gitmemory.com/*
*://giters.com/*
*://githubmemory.com/*
*://*.wenyanet.com/*
*://issueexplorer.com/*
*://opensourcelibs.com/*
@sammcj
sammcj / LICENSE
Created December 13, 2021 04:11 — forked from garethr/LICENSE
A script for customers to use the Snyk API to get a list of projects impacted by the Log4Shell vulnerability
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@sammcj
sammcj / Makefile
Created January 15, 2020 02:04 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@sammcj
sammcj / glustertop.py
Created March 14, 2019 23:06 — forked from fpytloun/glustertop.py
Real time GlusterFS top-like monitoring
#!/usr/bin/env python
"""
Display gluster traffic
This tool uses gluster profiling feature, parsing cumulative statistics.
To understand correctly the results, you have to divide overall write statistics with number of replicas.
Also striped volumes needs to be taken in mind - overall statistics just print sum of all bricks
read/written bytes.

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@sammcj
sammcj / postmortem.md
Created October 17, 2017 01:20 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
$ mco federation trace dev1-0.choria
Received response from dev1-0.choria in 24ms
Reported Route:
client.choria
nats1.fed
nats3.fed
fb builder:1
nats2.choria
nats1.choria