Skip to content

Instantly share code, notes, and snippets.

@tied
tied / select_all_confluence_spaces.sql
Created December 3, 2024 14:24 — forked from v20100v/select_all_confluence_spaces.sql
List all Confluence spaces with indicators in raw SQL
SELECT DISTINCT
s.spaceid as space_id,
s.spacename as space_name,
s.spacekey as space_key,
s.spacetype as space_type,
s.spacestatus as space_status,
sd.body as space_description,
s.creationdate as space_creation_date,
up.username as space_creator_username,
u.display_name as space_creator_displayname,
@tied
tied / README.md
Created August 25, 2023 10:58 — forked from marnix/README.md
Userscript for Jira issue page updated notification

In your browser, install TamperMonkey or another Userscript manager browser extension.

Then you can simply go to https://gist.github.com/marnix/0d27e891be359afc69ba5b090b6607b1/raw/jira-issue-page-updated-notification.user.js, which should trigger the browser extension to install the latest version of this userscript. And you can also use the same URL for updating to newer versions (which I occasionally expect to release).

An identical copy is also published via Greasy Fork (https://greasyfork.org/en/scripts/462479-jira-issue-page-updated-notification).

@tied
tied / Documentation.md
Created January 19, 2023 07:22 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@tied
tied / getTitleNative.js
Created January 19, 2023 07:22 — forked from jbinto/getTitleNative.js
Get title from remote HTML URL - without jQuery
// Only using native browser features (no jQuery).
// Uses `fetch`, `DOMParser` and `querySelectorAll`.
const getTitle = (url) => {
return fetch(`https://crossorigin.me/${url}`)
.then((response) => response.text())
.then((html) => {
const doc = new DOMParser().parseFromString(html, "text/html");
const title = doc.querySelectorAll('title')[0];
return title.innerText;
@tied
tied / self-signed-certificate-with-custom-ca.md
Created January 19, 2023 07:21 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@tied
tied / gist:3bbcf130568fb5a2b86b734a218cc9b5
Created January 19, 2023 07:20 — forked from greeno/gist:5725631
Do you have user accounts automatically created in Confluence? Do most of these users never create content? Are you close to your Confluence license? Then this script is for you! It really just tries to remove EVERYONE from Confluence. The good part is that it fails if the user has content. So it will just remove the readers which is a good thin…
import xmlrpclib
url = "https://your-confluence.awhere"
s = xmlrpclib.ServerProxy(url + "/rpc/xmlrpc")
print "Logging in..."
token = s.confluence2.login("username","*****")
if not token:
print "No Token!!"
@tied
tied / harden_nginx.sh
Created January 19, 2023 07:20 — forked from mko-x/harden_nginx.sh
Simple script to harden an nginx webserver
#Firewall Seup:
apt-get install ufw
ufw default deny incomming
ufw default allow outgoing
ufw allow from $yourIP to any port 22
ufw allow 443
#Nginx Versionen verbergen
sed -i "s/# server_tokens off;/server_tokens off;/g" /etc/nginx/nginx.conf
#ETags entfernen
sed -i 's/server_tokens off;/server_tokens off;\netag off;/' /etc/nginx/nginx.conf
@tied
tied / AlmaValidateFields.groovy
Created January 19, 2023 07:20 — forked from jweisman/AlmaValidateFields.groovy
Script to validate the existence of several custom fields on transition using the ScriptRunner plugin for Jira.
import com.opensymphony.workflow.InvalidInputException
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
def customFieldManager = ComponentManager.getInstance().getCustomFieldManager()
def fields = []
// For Alma issues, if issue is fixed, make all sorts of validations
@tied
tied / jira_letsencrypt.md
Created January 19, 2023 07:19 — forked from dborin/jira_letsencrypt.md
HOWTO Configure Atlassian Jira to use Letsencrypt certificate

HOWTO Configure Atlassian Jira to use Letsencrypt certificate with default Tomcat

This is a primer for installing a Letsencrypt certificate on a Jira server that is running the Jira provided, default Tomcat for serving webpages.

I found lots of information about how to do it using a free-standing Tomcat or nginx, but nothing about this particular combination. I hope it helps you!

Obviously, in all the examples, you need to replace jira.example.com with your own domain! And (duh) you need to use your own password, not 1234

You need to have installed Java (outside the scope of this document). Then in your user's shell RC file and probably root's RC file, add

@tied
tied / jira-behing-nginx-ssl
Created January 19, 2023 07:19 — forked from alertor/jira-behing-nginx-ssl
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {