Skip to content

Instantly share code, notes, and snippets.

dig +short txt nyan.lpbk.net | sed 's/[" ]//g' | base64 -d | gunzip
@paulseward
paulseward / gist:c4c6ab990c1a5da72418cb14a999d7ab
Created January 12, 2024 15:48
cnet incoming processing rules
;===========================================================================================================
[CNET-Incoming-IAX]
; This context is where incoming calls initially land. It's purpose is to sanity check them to make sure
; they look reasonably legit (eg their callerID is meaningful) and to strip anything possibly nasty
; out of their intended extension before passing it in to the CNET-dialplan context where the numbers
; we're hosting actually live
;
; Contributed by Ian Jolly (with local modifications to make it fit for our purposes)
;===========================================================================================================
watch -t "TZ='UTC-1' date \"+((%H*60+%M)*60+%S)/86.4\" | bc | figlet"
@paulseward
paulseward / ringback.conf
Last active October 30, 2020 17:18
Simple faultsmans ringback for asterisk
;======================================================================
; This context (and SIP-ringback-complete) do faultsmans ringback
;
; Use it like this:
; exten => 174,1,GoSub(SIP-ringback,s,1)
;======================================================================
[SIP-ringback]
exten => s,1,Answer()
exten => s,n,Set(RINGBACK=${FILTER(0123456789+,${CALLERID(num)})})
@paulseward
paulseward / code.gs
Created October 31, 2019 15:04
Google Apps Script: Form to email
/*
This is not production ready in any way shape or form, and is form-specific
but it takes a Google Form and does a really bad job of turning it into a PDF
and sending it by email.
It probably does Really Bad Things (tm) if you feed it html via the form fields
but there we are.
Simplistic integration with slack/trello can be done by adding suitable
email endpoints to the BCC field.

Keybase proof

I hereby claim:

  • I am paulseward on github.
  • I am paulseward (https://keybase.io/paulseward) on keybase.
  • I have a public key ASB4z7VFi7MKQ3DMkEmEJl8lmJgFF2WQpTNV6JIZHiWs8Ao

To claim this, I am signing this object: