Skip to content

Instantly share code, notes, and snippets.

View Max95Cohen's full-sized avatar

Max Cohen Max95Cohen

View GitHub Profile
@Max95Cohen
Max95Cohen / fix.sh
Created February 24, 2022 00:50 — forked from AndersonIncorp/fix.sh
GRUB loading. Welcome to GRUB! error: file `/boot/grub/i386-pc/normal.mod` not found.
# GRUB loading.
# Welcome to GRUB!
#
# error: file `/boot/grub/i386-pc/normal.mod` not found.
# Entering rescue mode...
grub rescue> ls
hd(0) (hd0,msdos1)
grub rescue> set
cmdpath=(hd0)
prefix=(hd0,msdos1)/boot/grub
@Max95Cohen
Max95Cohen / sshd_config
Last active January 25, 2023 04:30
sshd_config
Port 33022
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries = 3
PermitEmptyPasswords no
PermitRootLogin no
Protocol 2
ClientAliveInterval 180
AllowUsers test@192.168.10.7 pest
DenyUsers james
@Max95Cohen
Max95Cohen / apache2.conf
Last active January 20, 2023 03:35
apache2.conf config
ServerSignature Off
ServerTokens Prod
ServerName "localhost.local"
[Service]
UMask=0007
@Max95Cohen
Max95Cohen / logrotate.d
Last active October 17, 2023 15:22
logrotate.d mysql script
# /etc/logrotate.d/mysql_general
/var/lib/mysql/platonus.log{
compress
dateext
maxsize 300M
copytruncate
maxage 365
dateformat -%Y%m%d%s
hourly
@Max95Cohen
Max95Cohen / config
Last active January 15, 2023 07:42
config ssh
~/.ssh/config
Host *
ServerAliveInterval 30
ServerAliveCountMax 2
@Max95Cohen
Max95Cohen / example.service
Last active January 15, 2023 07:40
example.service linux systemd
[Unit]
Description=goweb
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=/home/kafka/main
User=
@Max95Cohen
Max95Cohen / .gitconfig_global
Last active January 15, 2023 07:39
.gitconfig_global config
[user]
name = Max_Cohen
email = showman_sexy@bk.ru
[core]
autocrlf = true
excludesfile = C:\\Users\\How are you\\gitignore_global.txt
[alias]
# l = log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
@Max95Cohen
Max95Cohen / .screenrc
Last active January 15, 2023 07:38
.screenrc config
# Turn off the welcome message
startup_message off
# Disable visual bell
vbell off
# Set scrollback buffer to 10000
defscrollback 10000
# Customize the status line
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]'
@Max95Cohen
Max95Cohen / .vimrc
Last active February 22, 2023 12:23
.vimrc config
set autoindent
set hlsearch
set incsearch
set number
set ruler
set tabstop=4 shiftwidth=4 softtabstop=4 expandtab
syntax on
"retab
@Max95Cohen
Max95Cohen / example.conf
Last active February 16, 2024 13:02
example.conf nginx virtual host config
map $http_origin $allow_origin {
~^https?://(.*\.)?my-domain.com(:\d+)?$ $http_origin;
default "";
}
upstream websocket {
server localhost:3001;
}
server {