Skip to content

Instantly share code, notes, and snippets.

@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active March 31, 2025 19:52
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@v20100v
v20100v / select_all_confluence_spaces.sql
Last active December 19, 2024 08:32
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,
@quietcricket
quietcricket / ec2_ami_linux_2_installation.sh
Last active September 25, 2019 04:31
EC2 AMI Linux 2 Installation, with python, uwsgi, supervisor, certbot & nginx
sudo yum update
# call amazon-linux-extras to view what packages are available
sudo amazon-linux-extras install nginx1
sudo systemctl enable nginx.service
sudo systemctl start nginx.service
# gcc and python-devel required for uwsgi
@noushi
noushi / ansible-summary.md
Created May 16, 2018 14:29 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 23, 2025 14:10
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 / README.md
Created August 29, 2016 15:01 — forked from kylewlacy/README.md
Mirroring an SVN Repo to GitHub

Certainly everyone has run into countless projects featured a source code repo that you wanted to clone (to build from source, for example). And certainly some of those repos were SVN-based. Now, if you're like me, you prefer the almighty git to this archaic and decrepit format that coding dinosaurs eons ago once used. So, what do you do? Go to GitHub, search for <project name>, and clone that. But wait, what if you run into a repo that doesn't have a GitHub mirror? What to do? Well, my friend, have you come to the right place:

The De-Facto SVN Mirroring Guide

I'm gonna go out on a limb and assume that you are UNIX-y, so if you am Windows, go here immediately to remedy that. Now then, fire up your terminal emulator, and follow along:

1.) Clone the repo with git as follows: git svn clone <repo url> -T trunk -t tags -b branches <project name> 2.) Add a GitHub repo for the project ('cuz, you know, sharing and whatnot) 3.) cd an

@tonysneed
tonysneed / Mac OS X: Open in Visual Studio Code
Last active March 29, 2025 18:40
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@jbinto
jbinto / getTitleNative.js
Created January 13, 2016 07:32
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;
@jesslilly
jesslilly / README.md
Last active March 22, 2024 14:16
Deluxe Cron Job Wrapper

Cron Job Wrapper Wish List

I want a script that will give me:

  1. Logging
  2. Log purging!
  3. Email errors!
  4. Prevent duplicate processes! (flock)
  5. Source an environment file!
  6. Anything else?
@arielallon
arielallon / create-local-branches.sh
Created July 29, 2015 15:22
Migrate branches and tags to git from svn when using Atlassian's scripts
for branch in `git branch -r | grep "origin/[^tags|master|trunk]" | sed 's/ origin\///'`; do
git branch $branch remotes/origin/$branch
done