Skip to content

Instantly share code, notes, and snippets.

View franek's full-sized avatar

François D. franek

View GitHub Profile

Troubleshooting

Intro

The incident management steps I have in mind when being on-call and getting an alert are:

  • Verify the issue
  • Triage
  • Communicate and scalate if needed
  • Mitigate
@melvinpetix
melvinpetix / new-relic-terraform.md
Created October 17, 2021 02:04 — forked from gspncr/new-relic-terraform.md
New Relic Terraform step by step

New Relic Terraform Provider step by step

# Configure terraform
terraform {
  required_version = "~> 0.14.0"
  required_providers {
    newrelic = {
      source  = "newrelic/newrelic"
      version = "~> 2.9.0"
@asamofal
asamofal / update_bions_lenovo_x1_g6.md
Created April 18, 2020 21:50
Update BIOS on ThinkPad X1 Carbon Gen 6th (Ubuntu 18.04, Legacy mode)

Update BIOS on ThinkPad X1 Carbon Gen 6th (Ubuntu 18.04)

Laptop (ThinkPad) Lenovo X1 Carbon 6th Gen (Type 20KH, 20KG)

If you are using your ThinkPad X1G6 with Linux in "Legacy only" mode, there's only one way how to update BIOS - you should use "BIOS Update (Bootable CD)". So this is a step by step guid how to do it.

Check current BIOS version:

fwupdmgr get-devices

@IanColdwater
IanColdwater / twittermute.txt
Last active May 23, 2024 18:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
#!/bin/bash
# Use an environment variable to know which branch should be used.
if [ -z "$D8_UPSTREAM_BRANCH" ]; then
echo "Missing the \$D8_UPSTREAM_BRANCH environment variable which must be set to something like '8.7.x'."
exit 1
fi
current_branch=$(git symbolic-ref --short HEAD)
branch=${1:-${D8_UPSTREAM_BRANCH}}
@bastnic
bastnic / .vimrc
Last active November 18, 2019 20:02
nvalt rewrite in bash and vim
function! s:goyo_enter()
let b:quitting = 0
let b:quitting_bang = 0
autocmd QuitPre <buffer> let b:quitting = 1
cabbrev <buffer> q! let b:quitting_bang = 1 <bar> q!
endfunction
function! s:goyo_leave()
" Quit Vim if this is the only remaining buffer
if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active June 19, 2024 21:51
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@hackerb9
hackerb9 / extract_cookies.sh
Last active March 31, 2024 17:04 — forked from spk/extract_cookies.sh
Extract cookies.sqlite to cookies.txt for use in wget or curl.
#!/bin/bash -e
# extract_cookies.sh:
#
# Convert from Firefox's cookies.sqlite format to Netscape cookies,
# which can then be used by wget and curl. (Why don't wget and curl
# just use libsqlite if it's installed?)
# USAGE:
#
# $ extract_cookies.sh > /tmp/cookies.txt
@garystafford
garystafford / helpful-docker-commands.sh
Last active June 20, 2024 16:59
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs