Skip to content

Instantly share code, notes, and snippets.

View tarik02's full-sized avatar
🍉
Based

Taras tarik02

🍉
Based
View GitHub Profile
@tarik02
tarik02 / main.js
Created April 13, 2026 15:44
Electron linux reproduce titleBarOverlay color
import { app, BrowserWindow } from 'electron';
function createWindow() {
const win = new BrowserWindow({
width: 1200,
height: 800,
titleBarStyle: 'hidden',
titleBarOverlay: {
height: 40,
color: 'rgba(0,0,0,0)', // color: 'rgba(1,0,0,0)', works!
@tarik02
tarik02 / Crash trace
Created April 13, 2026 15:02
Electron linux debug build crash
[883645:0413/180216.005856:FATAL:ui/gfx/color_utils.cc:651] DCHECK failed: (((background) >> 24) & 0xFF) == SK_AlphaOPAQUE (0 vs. �).
#0 0x561c95c49f62 base::debug::CollectStackTrace() [../../base/debug/stack_trace_posix.cc:1050:7]
#1 0x561c95c31781 base::debug::StackTrace::StackTrace() [../../base/debug/stack_trace.cc:280:20]
#2 0x561c95b2db5e logging::LogMessage::Flush() [../../base/logging.cc:708:29]
#3 0x561c95b2da1c logging::LogMessage::~LogMessage() [../../base/logging.cc:697:3]
#4 0x561c95b15fd1 logging::(anonymous namespace)::DCheckLogMessage::~DCheckLogMessage() [../../base/check.cc:181:3]
#5 0x561c95b158e3 logging::CheckError::~CheckError() [../../third_party/libc++/src/include/__memory/unique_ptr.h:74:5]
#6 0x561c973f38c8 color_utils::BlendForMinContrast() [../../ui/gfx/color_utils.cc:651:3]
#7 0x561c98340a56 views::FrameCaptionButton::SetImage() [../../ui/views/window/frame_caption_button.cc:123:10]
#8 0x561c98340986 views::FrameCaptionButton::MaybeRefreshIconAndInkdropBaseColor() [../../ui/views
@tarik02
tarik02 / index.html
Last active April 13, 2026 14:40
Electron WCO smoke
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<style>
:root {
--fallback-title-bar-height: 40px;
}
#!/usr/bin/env bash
set -Eeuo pipefail
# -c, --context string context in the kubeconfig file of the PVC
# -k, --kubeconfig string path of the kubeconfig file of the PVC
# -R, --mount-read-only mount the PVC in ReadOnly mode (default false)
# -n, --namespace string namespace of the PVC
# -d, --dir string dir to mount to (defaults to /mnt)
@tarik02
tarik02 / download-math-moodle.js
Last active October 5, 2020 16:00
download-math-moodle.js
// copy(JSON.stringify([...$('.topics .section:not(:first-child) .content .section .activityinstance>a')].map(it => ({ name: it.innerText + '.doc', href: it.href }))))
const data = [{ "name": "Лекція 1.1. Визначники. Основні поняття, властивості, обчислення визначників.,\nФайл.doc", "href": "http://mdl.lntu.edu.ua/mod/resource/view.php?id=15192" }, { "name": "Самостійна робота.1.1 Визначники.\nФайл.doc", "href": "http://mdl.lntu.edu.ua/mod/resource/view.php?id=15193" }, { "name": "Лекція 2.1. Матриці. Основні поняття, властивості, дії над матрицями.\nФайл.doc", "href": "http://mdl.lntu.edu.ua/mod/resource/view.php?id=15194" }, { "name": "Лекція 2.2. Обернена матриця. Ранг матриці.\nФайл.doc", "href": "http://mdl.lntu.edu.ua/mod/resource/view.php?id=15195" }, { "name": "Самостійна робота 2.1. Матриці.\nФайл.doc", "href": "http://mdl.lntu.edu.ua/mod/resource/view.php?id=15196" }, { "name": "Лекція 3.1. Системи лінійних алгебраїчних рівнянь.\nФайл.doc", "href": "http://mdl.lntu.edu.ua/mod/resource/view.php?id=1
import sys
from functools import reduce
N = 4
VARS = 'abcd'
mult = lambda a, b: a * b
def showN(i):
if i == 1:
@tarik02
tarik02 / love
Created August 6, 2019 19:23
wsl polyfills
#!/bin/bash
if (( $# > 0 )); then
lovec.exe "$@"
else
lovec.exe .
fi
@tarik02
tarik02 / main.c
Created May 26, 2019 09:13
Repack cossacks resources.gsc (all.gsc) from Russian to English version.
#include <stdio.h>
#include <stdint.h>
#include <math.h>
#define INPUT_KEY 0x4EBA // Input key (Russian)
#define OUTPUT_KEY 0x78CD // Output key (English)
#define CHUNK_SIZE 1024 * 1024 // 1MB
int main(int argc, char *argv[]) {
function intersect(r1, r2) {
if (r2.p1.x > r1.p2.x
|| r2.p2.x < r1.p1.x
|| r2.p1.y > r1.p2.y
|| r2.p2.y < r1.p1.y) {
return null;
}
return {
//-------------------------------BEGIN CONFIG-------------------------------//
//#ifdef LOCAL
#define IO_FILES
//#else
//#define IO_STD
//#endif
//#define IO_INPUT_NAME "input.txt"
//#define IO_OUTPUT_NAME "output.txt"