Skip to content

Instantly share code, notes, and snippets.

View ryanwoodsmall's full-sized avatar
🍞
🍞 bread 🍞 sandwich 🍞

ryan ryanwoodsmall

🍞
🍞 bread 🍞 sandwich 🍞
View GitHub Profile
@ryanwoodsmall
ryanwoodsmall / passgitgpg.md
Created August 25, 2021 20:50 — forked from flbuddymooreiv/passgitgpg.md
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

@ryanwoodsmall
ryanwoodsmall / sierpinksi.py
Created August 27, 2021 07:05
sierpinksi.py
# via: https://blog.pimaker.at/texts/rvc1/
def s(n):
d=["*"]
for i in range(n):
sp=" "*(2**i)
d=[sp+x+sp for x in d] + [x+" "+x for x in d]
return d
print("\n".join(s(4)))
/*
* https://dropbear.sh/code/modelf.c
* https://dropbear.sh/blog/elf-patching.html
*/
/*
BSD 3-Clause License
Copyright (c) 2022 dropbear
@ryanwoodsmall
ryanwoodsmall / 1_Hello_libtls
Created June 15, 2022 17:01 — forked from kinichiro/1_Hello_libtls
Hello libtls - libressl libtls API sample program
Hello libtls - libressl libtls API sample program
@ryanwoodsmall
ryanwoodsmall / pass.md
Created February 7, 2023 15:35 — forked from abtrout/pass.md
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@ryanwoodsmall
ryanwoodsmall / fix-intel_wifi_aer-avell_g1513_fire_v3
Created June 30, 2023 04:37 — forked from Brainiarc7/ fix-intel_wifi_aer-avell_g1513_fire_v3
Temporary fix for AER's excessive `severity=Corrected` logging for Intel Wireless (Avell G1513 Fire V3) (Arch Linux)
silly gist hack, why do we need you? :(
@ryanwoodsmall
ryanwoodsmall / ssh-agent-helper.bash
Last active August 17, 2023 06:02
ssh-agent-helper.bash
#!/usr/bin/env bash
# ssh
export GIT_SSH_COMMAND="ssh -4"
sshagentenv="/tmp/ssh-agent-${USER}.sh"
touch "${sshagentenv}"
. "${sshagentenv}"
if ! $(ps -U "${USER}" | grep -q 'ssh-agent') ; then
eval `ssh-agent -s`
for e in SSH_AGENT_PID SSH_AUTH_SOCK ; do
sed -i "/^export ${e}=.*/d" "${sshagentenv}"
@ryanwoodsmall
ryanwoodsmall / jenkins-abort-running-clearqueue.groovy
Created August 4, 2023 08:55
jenkins-abort-running-clearqueue.groovy
/*
* https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-controllers/how-can-i-purge-or-clean-the-build-queue
*/
Jenkins.instance.queue.clear()
/*
* https://stackoverflow.com/questions/12305244/cancel-queued-builds-and-aborting-executing-builds-using-groovy-for-jenkins
*/
import java.util.ArrayList
import hudson.model.*;
@ryanwoodsmall
ryanwoodsmall / inetd.go
Created August 31, 2023 03:57 — forked from stephane-martin/inetd.go
Make a net.Listener to listen on stdin for inetd enables services
package main
import (
"errors"
"net"
"os"
"sync"
)
type StdinListener struct {
@ryanwoodsmall
ryanwoodsmall / jenkins_abort_job_by_name_and_build_number.groovy
Created September 21, 2023 17:07
jenkins_abort_job_by_name_and_build_number.groovy
Jenkins.instance
.getItemByFullName("JobName")
.getBuildByNumber(JobNumber)
.finish(hudson.model.Result.ABORTED,
new java.io.IOException("Aborting build")
);