Skip to content

Instantly share code, notes, and snippets.

View Toxblh's full-sized avatar
✌️

Anton Palgunov Toxblh

✌️
View GitHub Profile
@Toxblh
Toxblh / gtk.css
Last active October 17, 2024 15:48
MacOS like style for GTK3 and GTK4 window actions. Download and move to ~/.config/gtk-4.0/gtk.css
windowcontrols >* {
transition: all 0.1s;
}
windowcontrols > .close {
margin-left: -6px;
}
windowcontrols > .minimize {
margin-left: -6px;
// Select all elements that contain the "mailto:" email link
const emailLinks = document.querySelectorAll('a.email[href^="mailto:"]');
emailLinks.forEach(link => {
// Extract the email address from the "mailto:" href attribute
const email = link.getAttribute('href').replace('mailto:', '').trim();
// Use CryptoJS to generate MD5 hash of the email (Gravatar uses lowercased MD5 hash of the email)
const emailHash = CryptoJS.MD5(email.toLowerCase()).toString();
/* Set global font and background */
body,
td,
th,
input,
dt,
#titles {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans',
Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
font-size: small;
#include "AvEncoder.h"
#include <iostream>
#include <string>
#include <queue>
#include <functional>
#include <cstdint>
extern "C"
@Toxblh
Toxblh / bash-to-zsh-hist.py
Created January 30, 2021 14:29 — forked from muendelezaji/bash-to-zsh-hist.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@Toxblh
Toxblh / netspeed.sh
Created May 13, 2020 15:07 — forked from rsvp/netspeed.sh
netspeed.sh : check download speed rate via command line | Linux bash script
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2013-07-11
#
# _______________| netspeed : check download speed via command line.
#
# Usage: netspeed [tokyo, london, usw, use, east, west, URL]
# ^default U.S. west coast.
# [ -speed_KB/sec ]
# ^negation activates the Mbps converter.
#
ping ya.ru # проверка интернета
timedatectl set-ntp true
wifi-menu -o # настройка wifi соединения
fdisk -l # смотрим диски
Modified from the gist @https://gist.github.com/odiumediae/3b22d09b62e9acb7788baf6fdbb77cf8
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim