Skip to content

Instantly share code, notes, and snippets.

View kevinfoote's full-sized avatar
⌨️

Kevin Foote kevinfoote

⌨️
View GitHub Profile
@kevinfoote
kevinfoote / scratchpad.js
Created December 4, 2023 21:07 — forked from dotproto/scratchpad.js
Simple in-browser scratch pad with bookmark-based "saving." To use, copy and paste the this gist into your URL bar. Once loaded, you can save by dragging the link in the top left corner onto your bookmarks bar.
data:text/html,
<!-- See https://gist.github.com/svincent/699c0a9027bb6bc8298b076e638718f1/edit -->
<a id="link" title="Drag this link onto your bookmark bar to save!">save scratchpad</a>
<div id="editor" contenteditable>Type something here!<div>To save, drag the link in the top right onto your bookmark bar.</div></div>
<style>
:root {
--line-height: 1.5em;
}
* {
@kevinfoote
kevinfoote / ipcc.py
Last active July 18, 2023 06:50 — forked from icementhols/ipcc.py
IP Checker for Raspberry Pi
#!/usr/bin/python
import smtplib
import subprocess
def send_email(ip):
fromaddr = '<insert from address>'
toaddrs = '<insert to address>'
msg = "Subject: External IP Update\n\nNew IP Address: %s" %ip
# Credentials (if needed)
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: temporary-deployment
name: temporary-deployment
spec:
replicas: 1
selector:
@kevinfoote
kevinfoote / brew_config.sh
Last active October 10, 2019 04:41
desktop_config
#!/bin/bash
NEW=0;
echo;
if [ ! -e ~/.clean ]; then
echo "..Installing Homebrew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
touch ~/.clean
${NEW}=1;

Keybase proof

I hereby claim:

  • I am kevinfoote on github.
  • I am kpfoote (https://keybase.io/kpfoote) on keybase.
  • I have a public key ASDJzB0kujPrhhhQA9lL4rmISKex2DkfYXT7Bhkd-DUmOQo

To claim this, I am signing this object:

@kevinfoote
kevinfoote / tomcat-init.sh
Created October 14, 2013 15:48
descriptive tomcat init file - RHEL
#!/bin/bash
###########################################################
# chkconfig: 345 83 20 #
# description: Tomcat AppServer #
###########################################################
# set environment
[ -n "${TOMCAT_USER}" ] || export TOMCAT_USER=<YOURTOMCATUSER>
[ -n "${CATALINA_BASE}" ] || export CATALINA_BASE=/opt/tomcat
@kevinfoote
kevinfoote / attribute-repository-from-headers.xml
Last active December 25, 2015 03:18
using persondir to map header attributes into CAS's attributeRepository
<!--
         PULL and Map HeadarAttributes for use
-->
<bean id="currentUserProvider"
      class="org.jasig.cas.adaptors.trusted.authentication.handler.support.PrincipalBearingCredentialsAuthenticationHandler"/>
<bean id="usernameAttributeProvider" class="org.jasig.services.persondir.support.SimpleUsernameAttributeProvider">
    <property name="usernameAttribute" value="username" />
</bean>
@kevinfoote
kevinfoote / showsess.sh
Last active December 22, 2015 18:39
showsess.sh - utility to view sessions on a Shibboleth2 IdP node
#!/bin/bash
#
# showsess.sh utility to view sessions on a Shibboleth2 IdP node
#
LOGSDIR="/opt/shibboleth-idp/logs";
HOST=`hostname -s`;
COUNT=0;
UNIQCOUNT=0;
RP=0;
FAILED=0;