Skip to content

Instantly share code, notes, and snippets.

View topalovic's full-sized avatar
🏴
✖️✖️✖️

Nikola Topalović topalovic

🏴
✖️✖️✖️
View GitHub Profile
@topalovic
topalovic / db-query-interface.org
Created September 29, 2023 13:41
Database query interface from org

Database query interface from org

See the docs for details.

@topalovic
topalovic / rails_fk_dependency_graph.rb
Last active October 17, 2023 05:14
Dependency graph of Postgres tables based on FK constraints
# Provides a dependency graph of PG tables based on FK constraints,
# in the form of a hash map:
# {
# "some_table" => ["dependent_table_1", "dependent_table_2"],
# "dependent_table_1"=> ["dependent_table_3"],
# # ...
# }
def fk_dependency_graph
query = <<~SQL
SELECT
@topalovic
topalovic / rgbram.sh
Created September 4, 2023 06:46
Kingston Fury Beast DDR5 RGB controller script
#!/bin/bash
#
# Kingston Fury Beast DDR5 RGB controller script
#
# Sauce:
# https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/2879#note_1336953263
#
# Supports only static colors.
#
# Usage examples:

Keybase proof

I hereby claim:

  • I am topalovic on GitHub.
  • I am topalovic (https://keybase.io/topalovic) on Keybase.
  • I have a public key whose fingerprint is E436 2CB0 0162 0632 6841 AB61 BDBB 1DDF BB0D 8B27

To claim this, I am signing this object:

@topalovic
topalovic / hacking-the-art-of-exploitation-vagrantfile.md
Last active March 4, 2022 03:41
A guide on building a Vagrant box from the "Hacking: The Art of Exploitation" Live CD.

Hacking2 Vagrant box

A short guide on building a Vagrant box from the Hacking: The Art of Exploitation, 2nd Edition LiveCD.

Prep the box

Create a new blank 32-bit Linux machine via VirtualBox UI (or console) and name it however you like. Insert the ISO file as a Live CD and