Skip to content

Instantly share code, notes, and snippets.

View zoxon's full-sized avatar

Zoxon zoxon

View GitHub Profile

Bittorrent uTorrent disable ads

Turn off ALL Ads/Featured Content/Bundle Crap in Utorrent/Bittorrent:

Options > Preferences > Advanced... Turn ALL settings to false:

  • bt.enable_pulse
  • distributed_share.enable
  • gui.show_notorrents_node
  • offers.left_rail_offer_enabled

#Fixing “WARNING: UNPROTECTED PRIVATE KEY FILE!” on Linux

If you are getting this error then you probably reset the permissions on your hidden .ssh directory in your user folder, and your keys aren’t going to work anymore. It’s very important that these files not be writable by just anybody with a login to the box, so openssh will give you an error if you try to use them.

The full error message:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@zoxon
zoxon / filesizeUrl.php
Last active February 13, 2025 11:32
PHP: Get file size by URL
function filesizeUrl($url) {
return ($data = @file_get_contents( $url )) ? strlen( $data ) : false;
}
@zoxon
zoxon / colors.ts
Last active February 3, 2025 03:47
/**
* @see https://stackoverflow.com/questions/9781218/how-to-change-node-jss-console-font-color
* @see https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
*/
export const COLOURS = {
$: (c: number) => (str: string) => `\x1b[${c}m` + str + '\x1b[0m',
gray: (str: string) => COLOURS.$(90)(str),
cyan: (str: string) => COLOURS.$(36)(str),
yellow: (str: string) => COLOURS.$(33)(str),
green: (str: string) => COLOURS.$(32)(str),
@zoxon
zoxon / web-images.sh
Created December 18, 2024 09:41
Optimize png and jpg and convert it to webp and avif, using node sharp
#!/bin/bash
# Check if sharp-cli is installed
if ! command -v sharp &> /dev/null; then
echo "Error: sharp-cli is not installed. Please install it using 'npm install -g sharp-cli'."
exit 1
fi
# Directories
INPUT_DIR="."

#b_ BEM CSS методология: Полное руководство

Главное: классы b-someblock__someelement__element__element-modificator - это не BEM! Как правильно верстать по BEM - читайте ниже.

  1. Длинное необязательное вступление
  2. Суть #b_
  • Зачем это всё?
  • Блок
  • Элемент
@zoxon
zoxon / vscode_shortcuts.md
Created April 6, 2021 03:39 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@zoxon
zoxon / Preferences.sublime-settings
Last active December 25, 2023 06:33
Sublime Text User Preferences
{
"bold_folder_labels": true,
"close_windows_when_empty": true,
"color_scheme": "Packages/User/Monokai Light (SL).tmTheme",
"default_encoding": "UTF-8",
"default_line_ending": "windows",
"dictionary": "Packages/Language - Russian/ru_RU.dic",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
{
"000000": "Black",
"000044": "Endless Galaxy",
"000066": "Alone in the Dark",
"000088": "Midnight in Tokyo",
"0000aa": "Bohemian Blue",
"0000ee": "Hyperlink Blue",
"0000ff": "Blue",
"00022e": "Illicit Darkness",
"000435": "Oblivion",