Skip to content

Instantly share code, notes, and snippets.

View apostololeg's full-sized avatar
🦉
d–_–b

Oleg Apostol apostololeg

🦉
d–_–b
View GitHub Profile
// Thx to: https://gist.github.com/xposedbones/75ebaef3c10060a3ee3b246166caab56#gistcomment-2951694
// map(4, ...[0, 20], ...[.3, 0]) // .24
const map = (value, x1, y1, x2, y2) => (value - x1) * (y2 - x2) / (y1 - x1) + x2;
@apostololeg
apostololeg / libinput-gestures.conf
Created January 4, 2021 08:24
~/.config/libinput-gestures.conf
# Generated by Gestures 0.2.3 --> https://gitlab.com/cunidev/gestures
# Manual editing might result in data loss!
# Invalid lines
# Unsupported lines
# Swipe threshold (0-100)
@apostololeg
apostololeg / terminator-config
Last active March 24, 2021 09:46
~/.config/terminator/config
[global_config]
window_state = maximise
suppress_multiple_term_dialog = True
always_split_with_profile = True
[keybindings]
cycle_next = None
cycle_prev = None
next_tab = <Ctrl>Tab
prev_tab = <Ctrl><Shift>Tab
paste = <Ctrl>V
@apostololeg
apostololeg / Code.gs
Last active November 4, 2021 13:46
Gmail remove batch messages
let count = 1500;
const batchSize = 100;
async function purgeGmail(query) {
const items = GmailApp.search("label:github", 0, batchSize);
console.log(count, items.length);
await GmailApp.moveThreadsToTrash(items);