Skip to content

Instantly share code, notes, and snippets.

title = '<h3>Swashbuckler 15 (+3 TH&D), 23 Strength, specialization VS Plate Mail'
[[DamageCalculations]]
acidDamage1bonus = 0
acidDamage1number = 0
acidDamage1probability = 100
acidDamage1sides = 2
acidDamage2bonus = 0
acidDamage2number = 0
acidDamage2probability = 100
@suy
suy / linux.txt
Last active April 25, 2021 07:44
Infinity Engine Pseudo-Random Number Generator results when rolling 1d20
This file has been truncated, but you can view the full file.
9
14
19
5
12
14
5
7
3
SYSCALL(args) = return
thread_selfid(0x6000003165C0, 0x60000040B630, 0x6000020F4B80) = 53886 0
csops(0x0, 0x0, 0x7FFF56778278) = 0 0
issetugid(0x0, 0x0, 0x7FFF56778278) = 0 0
shared_region_check_np(0x7FFF567761B8, 0x0, 0x7FFF56778278) = 0 0
stat64("/usr/local/lib/libosxfuse_i64.2.dylib\0", 0x7FFF56777078, 0x7FFF56778278) = 0 0
open("/usr/local/lib/libosxfuse_i64.2.dylib\0", 0x0, 0x0) = 3 0
pread(0x3, "\312\376\272\276\0", 0x1000, 0x0) = 4096 0
pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x8C000) = 4096 0
mmap(0x1095C0000, 0x1F000, 0x5, 0x12, 0x3, 0x8C000) = 0x1095C0000 0
@suy
suy / main.cpp
Created May 25, 2020 07:25
A simple tool to sort and print in a more human readable form the compiler output
#include <QtCore>
static void dump(const char* name, const QStringList& variable) {
QTextStream out(stdout);
out << variable.count() << " " << name << endl;
foreach (const QString& item, variable) {
out << " " << item << endl;
}
}
@suy
suy / problems.adoc
Last active July 30, 2018 16:21
BTRFS "no space" problem

Initially

# df -h -x tmpfs
Filesystem      Size  Used Avail Use% Mounted on
udev            7.8G     0  7.8G   0% /dev
/dev/sda1       9.4G  6.1G  3.3G  66% /
/dev/sda2       923G  439G  482G  48% /home
# btrfs fi show
Label: none  uuid: 1c8212fb-88ff-4f39-912a-5178a3547e6c
@suy
suy / threadpool-lingering.cpp
Created March 23, 2018 14:17
QThreadPool lingers till the end of the app, for good or bad
#include <QtCore>
class TurtleRunnable : public QRunnable
{
void run() override {
for (int i = 0; i < 15; ++i) {
qDebug("Tick %i", i);
QThread::sleep(1);
}
}
<manuelschneid3r> does QString("text") allocate exactly the necessary memory or do i have to squeeze?
<suy> qout: { QString t("text"); qDebug() << t.capacity(); }
<qout> 4
<suy> qout: { QString t("a much, much, much longer text"); qDebug() << t.capacity() << t.size(); }
<qout> 30 30
#include <QtCore>
#include <memory>
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
auto p = std::make_shared<int>(42);
auto t = new QTimer;
t->setSingleShot(true);
@suy
suy / output.adoc
Last active July 16, 2016 08:49
runtimepath after nvim-qt startup
/home/alex/personal/configs/dotvim/init.vim|| 1
/home/alex/personal/configs/dotvim/bundle/pathogen/autoload/pathogen.vim|| 2
/usr/share/nvim/runtime/autoload/provider/python.vim|| 3
/usr/share/nvim/runtime/autoload/provider/pythonx.vim|| 4
/usr/share/nvim/runtime/autoload/provider/python3.vim|| 5
/usr/share/nvim/runtime/autoload/remote/host.vim|| 6
/home/alex/personal/configs/dotvim/bundle/submode/autoload/submode.vim|| 7
/home/alex/personal/configs/dotvim/bundle/lastnextprevious/autoload/lastnextprevious.vim|| 8
@suy
suy / appveyor.adoc
Last active January 2, 2016 21:33
Notes on using Appveyor