Skip to content

Instantly share code, notes, and snippets.

@mrrcollins
mrrcollins / shorturl.js
Created February 25, 2024 17:07
YOURLS create short url
javascript:(function() {
var currentPage = encodeURIComponent(window.location.href);
var apiCall = 'https://SERVERADDRESS/yourls-api.php?signature=APIKEY&action=shorturl&url=' + currentPage;
fetch(apiCall)
.then(response => response.text())
.then(data => {
var parser = new DOMParser();
var xmlDoc = parser.parseFromString(data,"text/xml");
var title = xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue;
var shorturl = xmlDoc.getElementsByTagName("shorturl")[0].childNodes[0].nodeValue;
Mon 01/14/02 11:13 AM Clolata - Hi
Renee is h ere today. She is showing me how to get on the chat line. I can use it, but didn.t know how to get on. Made it.
Mon 01/14/02 11:13 AM collinsr - Hi!
Mon 01/14/02 11:14 AM Clolata - Hey Ryan, Where is Grandma's happy faces?
Mon 01/14/02 11:14 AM collinsr - I don't know, I don't use AOL that often.
Mon 01/14/02 11:14 AM collinsr - You can do it manually, : - ) all put together makes a happy face.
Mon 01/14/02 11:14 AM collinsr - :-)
Mon 01/14/02 11:15 AM collinsr - Winking is ; - )
Mon 01/14/02 11:15 AM collinsr - ;-)
Mon 01/14/02 11:15 AM collinsr - Tongue sticking out is : - P :-P
#!/bin/bash
cp=""
todaylist=${1}
while read i || [[ -n $i ]]; do
if [[ "${i}" =~ [^.*]:$ ]]; then
cp=$(echo "${i}" | tr '[:upper:]' '[:lower:]')
elif [[ ! "${i}" =~ "@done" && ! "${i}" =~ "@cancelled" ]]; then
if [ ${#i} -gt 0 ]; then
if [[ "${i}" =~ "@today" ]]; then priority="(A) "; i=$(echo "${i}" | sed "s/\@today //g"); else priority="";fi
#!/bin/bash
cd ${HOME}/notes
gstatus=`git status --porcelain`
if [ ${#gstatus} -ne 0 ]
then
git add --all
git commit -am "Git Sync `date` on `hostname` $gstatus"
git pull
#!/bin/bash
#Get the date
#echo "Remembering what day it is."
#UPDATE=$(date +"%Y%m%d")
#date=$(date)
#Get The Day of the Week
#!/bin/bash
# Requires wp-cli installed and a wp alias set up for each site
if [ -z ${@} ]; then
echo "Usage: createpost @SITE FILENAME"
exit
fi
#!/bin/bash
## New Drafts
## Modified from GozNote
## Quickly create notes from the commandline or something like Alfred
## v.03 - 2019/08/25 - Create files with only the last two digits of
## the year for the start of the filename instead of the whole year.
## v.02 - 2019/08/05
## v.01 - 2018/12/04
##
#!/bin/bash
# Store private config information in ~/.schedarchive
# Requirements:
# wp-cli installed and working
# Buffer account
# Buffer API KEY
# Buffer profile ids for the accounts that you want to post to
if [ ! -f ~/.schedarchive ]; then
#!/bin/bash
cd ~/.znc
sudo certbot -d ZNC.DOMAIN.TLD --manual --manual-public-ip-logging-ok --preferred-challenges dns certonly
sudo cp /etc/letsencrypt/live/ZNC.DOMAIN.TLD/fullchain.pem znc.pem
sudo cat /etc/letsencrypt/live/ZNC.DOMAIN.TLD/privkey.pem >> znc.pem
# Copy certificate over for weechat
cp znc.pem ~/.weechat/ssl/relay.pem
# Inside weechat, in the weechat buffer, use

Keybase proof

I hereby claim:

  • I am mrrcollins on github.
  • I am mr_rcollins (https://keybase.io/mr_rcollins) on keybase.
  • I have a public key ASBaNVyqOe0F1b5nUW7BcUUZsFb3ghWKPJO2F-L7XlScWQo

To claim this, I am signing this object: