Skip to content

Instantly share code, notes, and snippets.

View tdegrunt's full-sized avatar

Tom de Grunt tdegrunt

View GitHub Profile
@tdegrunt
tdegrunt / nerd_fonts.md
Created March 2, 2024 07:39 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
@tdegrunt
tdegrunt / postgres_queries_and_commands.sql
Created January 24, 2024 08:24 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@tdegrunt
tdegrunt / gist:626632aba41fda8fc82af33cc5d940c5
Last active January 15, 2023 12:38
Bluetooth not working on ChimeraOS 38
I'm using a computer (Minisforum HM90) which has a AMD/MediaTek RZ608 bluetooth/wifi chipset, wifi works, but bluetooth doesn't. Initially i got a vcp.c d-bus experimental not enabled error, but that was fixed by adding experimental to /etc/bluetooth/main.conf
After a long read and investigation I found an article mentioning that RZ608 may be buggy and restarting/cycling power and or completely removing the PC from power could resolve the issue. It did.
```
[gamer@chimeraos ~]$ rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
@tdegrunt
tdegrunt / readme.md
Created January 4, 2023 20:20 — forked from Kethen/readme.md
So steam deck recovery image dropped, let's boot it (sorta) (non amd hardware)

Booting the Steam Deck recovery image

https://help.steampowered.com/en/faqs/view/1B71-EDF2-EB6D-2BB3

SteamOS runs a custom grub to cater it's needs for it's A/B partition design. So far the said custom grub does not boot for me on ovmf/intel uefi (maybe it boots on amd? some said they managed to just rufus the image and boot it)

skip to https://gist.github.com/Kethen/698cfa8cf387e131ebd36fbfbfe9272e#gamescope-and-non-amd-gpu if it just boots for you

Upon closer inspection the official bootloader does load some kind of amd firmware before booting the kernel

@tdegrunt
tdegrunt / .solargraph.yml
Created November 14, 2022 13:39 — forked from searls/.solargraph.yml
My config with steps to use solargraph for Rails projects in VS Code (WIP)
---
include:
- ".solargraph_definitions.rb"
- "app/**/*.rb"
- "config/**/*.rb"
- "lib/**/*.rb"
exclude:
- test/**/*
- vendor/**/*
- ".bundle/**/*"
@tdegrunt
tdegrunt / Readme.md
Created July 6, 2022 19:56 — forked from mechamogera/Readme.md
Route53のDynamicDNS設定Rubyスクリプト

使用方法

  • 以下のようにしてスクリプトを取得する。もしくは、downloadして解凍。
 $ git clone git://gist.github.com/3973319.git
  • 実行
  • 自マシンでのIPアドレスを取得してRoute53にhoge.example.com.のAレコードを設定する
@tdegrunt
tdegrunt / bootstrap.sh
Created September 20, 2021 11:53
ubuntu 20.04 ruby / rails bootstrap
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev
sudo apt-get update
sudo apt-get -y install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev postgresql-13 postgresql-13-postgis-3 libpq-dev libtool-bin cmake pkg-config
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
sh -c 'echo "export PATH=~/.rbenv/bin:\$PATH" >> ~/.bash_profile'
sh -c 'echo "eval \"\$(rbenv init - bash)\"" >> ~/.bash_profile'
@tdegrunt
tdegrunt / a_openssl_playground.md
Created July 12, 2021 17:47 — forked from jcheng3397/a_openssl_playground.md
openSSL public key extract

OpenSSL Playground

Certificates

Print Certificate ( crt file )

openssl x509 -in stackexchangecom.crt -text -noout

Print Certificate ( pem file )

openssl x509 -in cert.pem -text -noout

Print Certificate ( cer file )

openssl x509 -inform der -in foobar.cer -noout -text

Read part of Certificate
@tdegrunt
tdegrunt / generatesamplembox.rb
Last active July 2, 2021 10:30
Generating sample mbox for IMAPtest
require 'mail'
require 'securerandom'
size_distribution = {
10 => (0..19),
80 => (20..39),
150 => (40..59),
250 => (60..79),
15_000 => (80..100)
}