Skip to content

Instantly share code, notes, and snippets.

View DavidPesticcio's full-sized avatar
🚀
¯\_(ツ)_/¯

David Pesticcio DavidPesticcio

🚀
¯\_(ツ)_/¯
View GitHub Profile
@DavidPesticcio
DavidPesticcio / FreeNAS.txt
Created June 13, 2020 16:39
FreeNAS: Unable to GPT format the disk...
Issue : Unable to GPT format disk...
Version : FreeNAS 11.3 - probably all versions that make use of GPT
Recommended : https://www.ixsystems.com/community/threads/hard-drive-burn-in-testing-discussion-thread.21451/
Quick Fix : Step 1, optionally step 2
1) gpart recover /dev/affected-device
2) sysctl kern.geom.debugflags=0x10
dd if=/dev/zero of=/dev/affected-device bs=512 count=1
Background:
If you get a disk, or disks, fail to be added to a pool with this error, or it "runs out of space" before completing...
@DavidPesticcio
DavidPesticcio / pfSense config.md
Created March 17, 2020 13:43 — forked from deergod1/pfSense config.md
pfSense Easy Configuration Guide for HP t620 Plus

pfSense Simple Home Configuration - 2.4.3 / 2.4.4

Starting from Scratch

This is my personal guide for installing pfSense. I had to make notes to capture the details of the "install from scratch" to ensure I didn't forget the important details. Also, I'm trying to follow the philosophy of building systems with discrete "disposable" components that make a system mutable and less rigid. It does not cover installing any packages like Squid or Suricata as that's way beyond the scope of a basic, functional install.

I migrated from an environment that was at various times running Tomato Toastman 1.28 or Asuswrt-Merlin on Netgear and ASUS routers across four access points (one always acting as the firewall/gateway). It was pretty fast, but had roaming problems, and I was using full Wifi routers with half the stuff disabled. Also, even with 300mb internet service, I found that I could easily swamp the connection and drastically affect VOIP and Wifi Calling without even trying. The only fix was to throttle ever

@DavidPesticcio
DavidPesticcio / get_jenkins_credentials.groovy
Created November 26, 2019 18:15
Jenkins: How to decrypt credentials
// Here is a short snippet you can just run from the jenkins script console, to dump all of your credentials to plain text.
com.cloudbees.plugins.credentials.SystemCredentialsProvider.getInstance().getCredentials().forEach{
it.properties.each { prop, val ->
println(prop + ' = "' + val + '"')
}
println("-----------------------")
}
@DavidPesticcio
DavidPesticcio / git-forget-blob
Created November 22, 2019 13:11
Completely remove a file from a Git repository history.
#!/usr/bin/env bash
# Completely remove a file from a Git repository history
#
# Copyleft 2017-2019 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage:
# git-forget-blob file_to_forget
#
# Notes:
@DavidPesticcio
DavidPesticcio / Docker connect to remote server.md
Created November 12, 2019 11:46 — forked from kekru/Docker connect to remote server.md
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@DavidPesticcio
DavidPesticcio / yubikey-helpers.fish
Created June 24, 2019 13:53 — forked from sprak3000/yubikey-helpers.fish
aws-vault yubikey fish shell helpers
# This is a conversion of the helpers for bash for use in fish shell.
# You can find the original bash code available at https://gist.github.com/chtorr/0ecc8fca27a4c5e186c636c262cc4757
#
# You can either:
# A. Place the entire block below into ~/.config/fish/config.fish
# B. Place the YUBIKEY_PROFILE line into ~/.config/fish/config.fish and place the individual functions into files
# (recommended).
# e.g., ~/.config/fish/functions/_aws_unset.fish contains the body of the _aws_unset function below.
# - install the Yubico authenticator app
@DavidPesticcio
DavidPesticcio / ansible-summary.md
Created April 23, 2019 21:21 — forked from andreicristianpetcu/ansible-summary.md
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

@DavidPesticcio
DavidPesticcio / k8s-pi.md
Created March 2, 2019 23:23 — forked from alexellis/k8s-pi.md
K8s on Raspbian
@DavidPesticcio
DavidPesticcio / docker-passwd.txt
Created January 28, 2019 12:01
Use an insecure docker installation to force change your password as root, without exposing how.
1. Copy and paste the two lines below, followed by CTRL-D to force change your passwd on an insecure docker installation:
export X=$(cat); eval $X
ID=user_id docker run -ti --rm --privileged --name passwd --hostname passwd -v /:/rooted alpine sh -c "chroot /rooted passwd $ID" ; unset X
2. To clean up the command line history, use:
up-arrow, CTRL-U, down-arrow, ENTER
@DavidPesticcio
DavidPesticcio / main.go
Created November 24, 2018 14:30 — forked from julz/main.go
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {