Skip to content

Instantly share code, notes, and snippets.

View Downes's full-sized avatar

Stephen Downes Downes

View GitHub Profile
javascript:void%20function(){var%20a=Math.min,b=Math.max;const%20c=b(document.documentElement.clientWidth||0,window.innerWidth||0),d=b(document.documentElement.clientHeight||0,window.innerHeight||0),e=a(c,900),f=a(d,1000);var%20g=window.location.href,h=document.title,i=%22%22;document.getSelection()%26%26(i=document.getSelection()),newUrl=`https://www.downes.ca/cgi-bin/api.cgi%3Fcmd=edit%26id=new%26table=post%26hub=yes%26url=${g}%26quote=${i}`,window.open(newUrl,%22%22,%22width=%22+e+%22,%20height=%22+f)}();
@Downes
Downes / gist:07b26f98998276d1949676f6ef313436
Created March 26, 2023 13:45
Mastodon Flickr Button Killer
javascript:(
function(){
var divsToHide = document.getElementsByClassName('status-card__actions');
for(var i = 0; i < divsToHide.length; i++){
divsToHide[i].style.display = "none";
}
}
)
()
@Downes
Downes / vhost.sh
Last active January 19, 2024 09:17 — forked from mattmezza/vhost.sh
bash script to create virtual host vhost with apache2 and Ubuntu
#!/bin/bash
# This script was originally used for create virtual hosts on CentOs.
# Created by alexnogard from http://alexnogard.com
# Improved by mattmezza from http://you.canmakethat.com
# Adapted for Apache2 on Ubuntu by Stephen Downes at https://www.downes.ca
# Feel free to modify it
# PARAMETERS
#
# $usr - User
# $dir - directory of web files
<date time=now;format=nice>
<box box_title>
[*table_field*]
<keyword db=post;number=10;sort=crdate DESC>
<link href="http://www.downes.ca/cgi-bin/api.cgi" rel="webmention" />