Skip to content

Instantly share code, notes, and snippets.

View deric4's full-sized avatar
🌮
DevSecOpsLeanSREAgileWTFBBQ

deric4 deric4

🌮
DevSecOpsLeanSREAgileWTFBBQ
  • The Hood Canal
View GitHub Profile
@hlindberg
hlindberg / fizzbuzz.pp
Last active July 9, 2020 23:31
FizzBuzz in Puppet 4.1
notice Integer[0,99].map |$x| {
case [$x % 3, $x % 5] {
[0, 0] : { fizzbuzz }
[0, default] : { fizz }
[default, 0] : { buzz }
default : { $x }
}
}
@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active June 2, 2025 02:25
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

Puppet::Parser::Functions.newfunction(:default_content,
:type => :rvalue,
:doc => <<-'ENDOFDOC'
Takes an optional content and an optional template name and returns the
contents of a file.
Examples:
$config_file_content = default_content($file_content, $template_location)
file { '/tmp/x':
#!/usr/bin/python
# Credit to frogor for the objc
from Foundation import NSBundle
import json
import objc
import os
import plistlib
import subprocess
@acolyer
acolyer / jessfraz.md
Created November 19, 2017 13:39
Containers, operating systems and other fun things from The Morning Paper
@dikiaap
dikiaap / git-io-custom-url.md
Last active December 5, 2024 06:42
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
@cliffrowley
cliffrowley / STREAMDECK_HID.md
Last active June 1, 2025 17:57
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

@lizthegrey
lizthegrey / attributes.rb
Last active May 23, 2025 05:50
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@joevt
joevt / EDIDUtil.sh
Last active May 20, 2025 02:48
A set of shell functions used to view and edit EDIDs.
#!/bin/bash
#!/bin/zsh
# by joevt May 24/2023
#=========================================================================================
edid_decode=edid-decode
#=========================================================================================
# Modify EDID