Skip to content

Instantly share code, notes, and snippets.

@guisea
guisea / needs-restarted
Last active May 30, 2024 18:18
A Custom Check for CheckMK - Checks RHEL/Debian and derived OS's for pending reboots
#!/bin/bash
# Filename: /local/share/check_mk/agents/custom/linux-reboot/lib/local/600/needs-restarted
source /etc/os-release
VERSION=$(echo ${VERSION} | awk -F . '{ print $1 }')
# RHEL and Derivatives
if ([[ $ID_LIKE =~ 'fedora' ]] || [[ $ID =~ 'rhel' ]]) && [[ $VERSION =~ '8' ]];
then
# RHEL 8
@jbouse
jbouse / jenkins-dump-credentials.groovy
Last active August 26, 2020 20:12 — forked from timja/jenkins-dump-credentials.groovy
Dump jenkins credentials - use in script console
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import com.cloudbees.jenkins.plugins.awscredentials.*
import org.jenkinsci.plugins.plaincredentials.impl.*
import hudson.plugins.blazemeter.*
domain = Domain.global()
@pat
pat / LICENSE.txt
Last active February 4, 2023 21:02
Running Setup SQL scripts on an RDS instance within a VPC, via Terraform
The MIT License (MIT)
Copyright (c) 2018 Pat Allan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@timja
timja / jenkins-dump-credentials.groovy
Last active May 16, 2024 16:46
Dump jenkins credentials - use in script console
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import org.jenkinsci.plugins.plaincredentials.impl.*
// def item = Jenkins.instance.getItem("your-folder")
@jeremyckahn
jeremyckahn / cs.md
Last active October 2, 2020 20:40
Practical Computer Science Fundamentals

Practical Computer Science Fundamentals

CompSci degrees cost a lot of money, take a lot of time, and aren't a viable option for a lot of folks. Luckily, much of what you'll learn in a proper Computer Science program can be self-taught online for free. This gist is a roundup of some of the most helpful resources I've found.

Where I'm coming from

I'm not pursuing a deep, academic comprehension of CS concepts — my goal is to become respectably conversant about the most prevalent and relevant subjects in the field.

Starting points

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 1, 2024 05:07 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 31, 2024 12:46
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@RichardBronosky
RichardBronosky / README.MD
Last active May 19, 2024 22:03
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.

This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]

@mllrjb
mllrjb / README.md
Last active April 10, 2024 17:30
Jenkins init.groovy.d role-based authorization strategy

Usage

Set a system environment variable AUTHZ_JSON_URL that points to a JSON file with the following structure:

{
  "admins": [
    "groupA", 
    "userA"
 ],