Skip to content

Instantly share code, notes, and snippets.

View antonpetrovmain's full-sized avatar

Anton Petrov antonpetrovmain

View GitHub Profile
@antonpetrovmain
antonpetrovmain / README.en.md
Created July 29, 2023 13:33 — forked from akihikodaki/README.en.md
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@antonpetrovmain
antonpetrovmain / org.eclipse.jdt.core.prefs
Created May 10, 2023 13:14 — forked from fbricon/org.eclipse.jdt.core.prefs
formatter settings under .settings/org.eclipse.jdt.core.prefs
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
@antonpetrovmain
antonpetrovmain / flip-board-automatically-chessable.js
Created October 18, 2022 10:42
Flip the chess board in Chessable exercises more easily.
// ==UserScript==
// @name Flip Chessable Board
// @namespace https://blz777.github.io/
// @version 0.1
// @description Flip the chess board in Chessable exercises more easily.
// @author You
// @match https://*.chessable.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=chessable.com
// @grant none
// @require http://code.jquery.com/jquery-3.4.1.min.js
@antonpetrovmain
antonpetrovmain / archive-messages.js
Created October 21, 2019 10:48
How to archive all messages from inbox?
(function run() {
let all = document.querySelectorAll('div[aria-label="Conversation actions"]');
if (all.length == 0) return;
let a = all[0];
a.click();
setTimeout(() => {
document.querySelectorAll('a[role=menuitem]').forEach(act => {
if (act.innerText.match(/Archive/)) act.click();
});
run();