Skip to content

Instantly share code, notes, and snippets.

@Justinzobel
Justinzobel / git_squash_commits_locally.md
Created October 25, 2023 07:41
Git Squash Commits Locally

4 is the number of commits you want to squash

git rebase -i origin/master~4 branch_name

This will open your edit, replace the pick with squash on the commits you want to squash into the main commit.

The editor will open again and you need to comment out all commit messages that you don't want.

git push -f git push origin +branch_name

@Justinzobel
Justinzobel / database-tools-rosetta-stone.md
Last active October 15, 2023 08:59
Database Tools Rosetta Stone MySQL PostgreSQL SQLite
Level Action MySQL PostgreSQL SQLite
General Exit quit \quit .quit
Database List Databases show databases; \l .databases
Database Create Database CREATE DATABASE db_name;
Database Connect to a Database use db_name; \c db_name
Table List Tables show tables; \dt .table
Table Describe Table Columns describe table_name; \d table_name .schema table_name
Processses Show Process List show processlist;
Read Data Show All Data select * from table_name; select * from table_name;
@Justinzobel
Justinzobel / thunderbird-115-fix.md
Last active March 16, 2024 02:25
Fix Thunderbird 115's title bar and remove search bar

Thunderbird 115 introduced a new look. I hate it. Not only does it no longer fit in with KDE Plasma, it lost functionality due to it's new integrated search bar in the title bar.

So I went on a mission to fix it.

To restore the regular title bar:

Go into Settings > General > Language & Appereance and uncheck the Hide system window titlebar

To remove search bar:

Discourse Maintenance Page with Apache2

As root

cd /var/discourse
nano containers/app.yml

Comment out these lines:

Matrix Synapse server error: Found users in database not native to my.domain!

  1. Backup instance/database
  2. Connect to your PostgreSQL database and remove users in the user_directory table that don't match your domain e.g: delete FROM user_directory WHERE user_id NOT LIKE '%chat.my.domain%';
@Justinzobel
Justinzobel / wofi-breeze-dark-theme.css
Created May 16, 2022 08:22
Wofi Breeze Dark Theme
window {
background-color: #31363b;
}
#input {
margin: 5px;
border-radius: 0px;
border: none;
border-bottom: 3px;
background-color: #31363b;
@Justinzobel
Justinzobel / example.md
Last active April 9, 2022 23:15
fedora pagure api curl example
token=123456789etc
curl -X POST "https://pagure.io/api/0/-/whoami" \
     -H "Authorization: token $TOKEN" \
     -H "Content-Type: application/x-www-form-urlencoded"
MySQL command to get a list of all pages (decoded from binary) and show the date they were last modified (in YYYYMMDD etc)
select cast(page_title as CHAR),cast(page_touched as CHAR) from page ORDER BY page_touched ASC;
To get mediawiki page names from MySQL use:
use db_name;
select page_id,cast(page_title as CHAR) from page;
alsa-lib-devel
attr-devel
audiofile-devel
black-hole-solver-devel
check-devel
cmark-devel
cups-devel
cyrus-sasl-devel
dbus-glib-devel
dialog