Skip to content

Instantly share code, notes, and snippets.

View rroberrt's full-sized avatar
🇳🇱

Robert Sizarov rroberrt

🇳🇱
View GitHub Profile
@rroberrt
rroberrt / README.md
Last active April 9, 2022 13:38
Regular expression for converting commit links to plain commit hashes.

URL to Commit RegEx

This regular expression can be used to convert a manually made commit link in Markdown into the plain commit hash, so GitHub (for instance) will automatically display links to commits in places where that's supported, but so you can keep the manual notation in your changelog file in your repository, for example (assuming it's using Markdown).

Using the regular expression from the regex.re file, you would convert the below syntax of a commit link:

[`xxxxxxx`](https://github.com/owner/repo/commit/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
@rroberrt
rroberrt / *-bad.json
Last active March 2, 2022 16:15
JSON response object samples from the account API.
{
"error": "An explanatory error message will be here.",
"result": false
}
@rroberrt
rroberrt / .js
Last active October 20, 2023 16:24
dark mode userscript
// ==UserScript==
// @name Dark mode
// @namespace http://tampermonkey.net/
// @version 2.0.0
// @description A userscript that darkens websites programmatically.
// @author msfninja
// @include *
// @grant none
// @run-at document-body
// ==/UserScript==
@rroberrt
rroberrt / main.cpp
Last active February 7, 2022 14:01
A sample void function that requires some changes...
// db-conf CLI
//
// GitHub: https://github.com/kerig-it/db-conf
// Libraries
#include <iostream>
#include <string>
#include <vector>