Skip to content

Instantly share code, notes, and snippets.

View ivannikovdv's full-sized avatar

Denis Ivannikov ivannikovdv

View GitHub Profile
#!/usr/bin/env bash
# When a command fails, bash exits instead of continuing with the rest of the script.
set -o errexit
# This will make the script fail, when accessing an unset variable.
# When you want to access a variable that may or may not have been set,
# use "${VARNAME-}" instead of "$VARNAME", and you’re good.
set -o nounset
@overflowy
overflowy / hetzner-gui.user.js
Created June 11, 2023 10:46
Automatically select GUI-Mode when opening a Hetnzer console
// ==UserScript==
// @name hetzner-gui
// @namespace Violentmonkey Scripts
// @match https://console.hetzner.cloud/console/*
// @grant none
// @version 1.0
// @author overflowy@riseup.net
// @description 11/06/2023, 12:15:51
// ==/UserScript==
@ivannikovdv
ivannikovdv / keybase.md
Created May 22, 2023 14:57
keybase.md

Keybase proof

I hereby claim:

  • I am ivannikovdv on github.
  • I am ivannikovdv (https://keybase.io/ivannikovdv) on keybase.
  • I have a public key ASBisyjtCv58THH-EF5HsvBqz-Pgla2SuMUxsEzmRWIdXwo

To claim this, I am signing this object:

@EugeneMeles
EugeneMeles / gist:e0f57b61cb345e0564807a8423d4e493
Created May 5, 2022 20:48
Fish shell + Nerd Font Hack + theme "Bobthefish" on Ubuntu
# add fish-shell repo and install:
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt update
sudo apt install fish
# add nerd-font hack:
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip
sudo mkdir /usr/local/share/fonts/Hack
sudo unzip Hack.zip -d /usr/local/share/fonts/Hack/
sudo fc-cache -fv
@davidteren
davidteren / nerd_fonts.md
Last active March 18, 2026 01:21
Install Nerd Fonts via Homebrew [updated & fixed]
@sbuckle
sbuckle / nginx.conf
Last active March 2, 2025 15:05
Nginx RTMP module configuration
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /run/nginx.pid;
load_module modules/ngx_rtmp_module.so;
events {
worker_connections 1024;
}
@Snarp
Snarp / google-docs-copy.js
Last active March 17, 2026 13:01
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@seachai
seachai / gist:948ed1eeafa32ce03db6685edb879f71
Last active March 17, 2026 15:27
iTerm 2 Natural Text Editing Preset
On iTerm2 - Open Preferences > Profiles > Keys > Key Mappings > Presets > Select Natural Text Editing
- You can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + →
- Move to the start of the line using fn + ← and to the end of the line with fn + →.
- Also you can delete a word backwards using Option ⌥ + ⌫, delete the whole line using Command ⌘ + ⌫.
If the preset doesn't appear, reinstall iTerm2. If you installed it using Homebrew + Cask:
brew cask reinstall iterm2
@ofirule
ofirule / convert_openvpn_conf_file_to_ovpn_file.py
Last active May 24, 2025 16:15
converting openvpn .conf file to .ovpn file
import sys, os
ALLOW_FILE_OPTIONS = ["ca", "cert", "dh", "extra-certs", "key", "pkcs12", "secret", "crl-verify", "http-proxy-user-pass", "tls-auth", "tls-crypt"]
filepath = sys.argv[1]
output_file = os.path.basename(filepath). replace(".conf", ".ovpn")
inline_tuples_to_add = []
# Git: синхронизация локального репо с удаленным
> http://qaru.site/questions/39175/git-sync-local-repo-with-remote-one
git fetch # This updates 'remote' portion of local repo.
git reset --hard origin/<your-working-branch>
===
# http://qaru.site/questions/39175/git-sync-local-repo-with-remote-one