Add the following line to your git configuration:
$ git config alias.housekeeping
!f() { git checkout -q ${1:-main} && git branch --merged | grep -v ^* | xargs -n1 -r git branch --delete; }; f
After merging branches run:
import firmware_variables as firmware | |
mok_namespace = "{605DAB50-E046-4300-ABB6-3DD810DD8B23}" | |
mok_variables = ["MokNew", "MokAuth"] | |
with firmware.privileges(): | |
for name in mok_variables: | |
try: | |
firmware.delete_variable(name, namespace=mok_namespace) | |
print(f"- firmware variable {name} removed") |
#ifndef APROPERTY_H | |
#define APROPERTY_H | |
#include <utility> | |
namespace Private { | |
template<class T, typename V> | |
using NotifyMemberFunction = void (T::*)(V); |
constexpr quint64 label(const char *const s, size_t shift = 0) | |
{ | |
if (s[0] == '\0') | |
return 0; // end of string | |
if (shift == 56) | |
return 0; // avoid integer overflow | |
return (static_cast<quint64>(s[0]) << shift) ^ label(&s[1], shift + 1); | |
} |
#include <stdint.h> | |
namespace detail { | |
constexpr uint8_t parse_octet(const char *str, const char *end, const char **out = nullptr) | |
{ | |
uint8_t octet = 0; | |
if (str < end) { | |
if (*str >= '3' && *str <= '9') { // 3-9 | 30-99 |
// ==UserScript== | |
// @name Remove Emoji from Twitter Handles | |
// @version 1 | |
// @grant none | |
// @include https://twitter.com/* | |
// ==/UserScript== | |
window.addEventListener('DOMContentLoaded', function() { | |
// Every 500 ms… | |
window.setInterval(function() { |
// Basic idea is to export the function as a Qt property that holds a JavaScript callable | |
Q_PROPERTY(QJSValue hasRoles READ hasRolesFunction NOTIFY rolesChanged FINAL) | |
// Possible implementation of such property | |
QJSValue ProfileService::hasRolesFunction() | |
{ | |
// create function factory to bind `this` | |
auto factory = qmlEngine(this)->evaluate("profileService => (roles => (profileService.roles & roles) === roles)"_l1); | |
if (factory.isError()) { |
Rang | Name | 1970 | 1980 | 1990 | 2000 | 2010 | 2018/2019 | Bundesland | |
---|---|---|---|---|---|---|---|---|---|
1. | Berlin | 3.208.719 | 3.048.759 | 3.433.695 | 3.382.169 | 3.460.725 | 3.669.491 | Berlin | |
2. | Hamburg | 1.793.640 | 1.645.095 | 1.652.363 | 1.715.392 | 1.786.448 | 1.847.253 | Hamburg | |
3. | München | 1.311.978 | 1.298.941 | 1.229.026 | 1.210.223 | 1.353.186 | 1.471.508 | Bayern | |
4. | Köln | 849.451 | 976.694 | 953.551 | 962.884 | 1.007.119 | 1.087.863 | Nordrhein-Westfalen | |
5. | Frankfurt am Main | 666.179 | 629.375 | 644.865 | 646.550 | 679.664 | 761.561 | Hessen | |
6. | Stuttgart | 634.202 | 580.648 | 579.988 | 583.874 | 606.588 | 634.830 | Baden-Württemberg | |
7. | Düsseldorf | 660.963 | 590.479 | 575.794 | 569.364 | 588.735 | 621.877 | Nordrhein-Westfalen | |
8. | Leipzig | 583.885 | 562.480 | 511.079 | 493.208 | 522.883 | 593.145 | Sachsen | |
9. | Dortmund | 640.642 | 608.297 | 599.055 | 588.994 | 580.444 | 588.250 | Nordrhein-Westfalen |
Rang Name 1970 1980 1990 2000 2010 2018/2019 Bundesland | |
1. Berlin 3.208.719 3.048.759 3.433.695 3.382.169 3.460.725 3.669.491 Berlin | |
2. Hamburg 1.793.640 1.645.095 1.652.363 1.715.392 1.786.448 1.847.253 Hamburg | |
3. München 1.311.978 1.298.941 1.229.026 1.210.223 1.353.186 1.471.508 Bayern | |
4. Köln 849.451 976.694 953.551 962.884 1.007.119 1.087.863 Nordrhein-Westfalen | |
5. Frankfurt am Main 666.179 629.375 644.865 646.550 679.664 761.561 Hessen | |
6. Stuttgart 634.202 580.648 579.988 583.874 606.588 634.830 Baden-Württemberg | |
7. Düsseldorf 660.963 590.479 575.794 569.364 588.735 621.877 Nordrhein-Westfalen | |
8. Leipzig 583.885 562.480 511.079 493.208 522.883 593.145 Sachsen | |
9. Dortmund 640.642 608.297 599.055 588.994 580.444 588.250 Nordrhein-Westfalen |
// | |
// Sometimes QML still surprise by really just doing the right thing. | |
// For instance the following lines: | |
// | |
// console.info("Status:", Status.Unknown, Status.Good, Status.Warning, Status.Failing); | |
// console.info("Sensor:", Sensor.Unknown, Sensor.Good, Sensor.Warning, Sensor.Failing); | |
// | |
// really print: | |
// | |
// qml: Status: 0 1 2 3 |