This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from PyQt6.QtCore import QSettings | |
import sys | |
import pathlib | |
base_path = pathlib.Path("/usr/share/qt6ct/colors/") | |
extension = ".conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<std::size_t N> | |
std::vector<char*> string_array_to_charpp(std::array<std::string, N>& string_array) | |
{ | |
std::vector<char*> vs; | |
vs.reserve(N); | |
for (std::size_t i = 0; i < N; ++i) { | |
vs.push_back(string_array.at(i).data()); | |
} | |
return vs; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
source=$1 | |
shift | |
config=${1:-Release} | |
shift || true | |
build=$(mktemp -d -t build-omm-XXXX) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is darktable klens+v0.1.1~62-gd9dce2159 reporting a segfault: | |
warning: Currently logging to /tmp/darktable_bt_P6OWB0.txt. Turn the logging off and on to make the new setting effective. | |
#0 0x00007f79ae2bd9ef in poll () at /usr/lib/libc.so.6 | |
#1 0x00007f79adfa8170 in () at /usr/lib/libglib-2.0.so.0 | |
#2 0x00007f79adfa9113 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0 | |
#3 0x00007f79adadc60f in gtk_main () at /usr/lib/libgtk-3.so.0 | |
#4 0x00007f79ae5574a9 in dt_gui_gtk_run (gui=<optimized out>) at ../src/gui/gtk.c:1259 | |
#5 0x000055ec4a923090 in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:83 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy as np | |
import sys | |
import matplotlib.pylab as plt | |
# p(x) = sum([ p * x**i for i, p in enumerate(ps)]) | |
def differentiate(ps): | |
return [ p * i for i, p in enumerate(ps) ][1:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QMainWindow> | |
#include <QApplication> | |
#include <QMenu> | |
#include <QMenuBar> | |
#include <QWidgetAction> | |
#include <QTextEdit> | |
#include <QLabel> | |
#include <QDebug> | |
class MyActionWidget : public QLabel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useragent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.167 Chrome/64.0.3282.167 Safari/537.36" | |
url="https://www.ultimate-guitar.com/search.php?search_type=title&value=hello" | |
wget --user-agent "$useragent" "$url" -O /tmp/page.html | |
firefox /tmp/page.html |