Skip to content

Instantly share code, notes, and snippets.

View s3rgeym's full-sized avatar
🏴‍☠️
Анархия - основа Интернета

[object Object] s3rgeym

🏴‍☠️
Анархия - основа Интернета
View GitHub Profile
@s3rgeym
s3rgeym / vim_cheatsheet.md
Created February 19, 2020 22:17 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@s3rgeym
s3rgeym / Search my gists.md
Created September 25, 2020 08:32 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@s3rgeym
s3rgeym / README.md
Created February 20, 2021 01:56 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
# Bash best practices and style-guide
Just simple methods to keep the code clean.
Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/).
## Quick big rules
* All code goes in a function
* Always double quote variables
@s3rgeym
s3rgeym / vim-shortcuts.md
Created March 19, 2021 22:03 — forked from tuxfight3r/vim-shortcuts.md
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@s3rgeym
s3rgeym / porno.md
Created March 20, 2021 10:00 — forked from strizhechenko/porno.md
Код ниже генерирует прекрасные названия, не знаю для чего, новые жанры порно или названия программных проектов.
#!/usr/bin/env bash

if [ ! -f /tmp/linux ]; then
    curl -sS https://www.linux.org.ru/ | egrep -o /tag/[0-9a-z-]+ | sed 's|/tag/||' > /tmp/linux
fi
if [ ! -f /tmp/pron ]; then
    curl -sS http://www.xvideos.com/tags  | egrep -o /tags/[a-z0-9-]+ | sed 's|/tags/||' > /tmp/pron
fi
@s3rgeym
s3rgeym / vim-cheatsheet.md
Created April 3, 2021 11:55
Vim and vimium shortcuts

Select and copy (works on vimium)

  • / to find text
  • v to enter visual mode
  • y to yank/copy

Duplicate line

  • v to enter visual mode
  • y to yank/copy
  • p to paste in the next line
frs/admin/qrs.php
__admin
__cache/
__index.php
__MACOSX
__pma___
__SQL
__test.php
_.htpasswd
_adm
we1h0
F6JO
Ryze-T
razordeveloper
w1u0u1
BGDonLINE
tr3ee
bewhale
huadema
MerlynXS
@s3rgeym
s3rgeym / httpx_aiohttp.py
Created June 22, 2022 03:55 — forked from imbolc/httpx_aiohttp.py
Httpx vs aiohttp benchmark
from starlette.applications import Starlette
from starlette.routing import Route
from starlette.responses import PlainTextResponse
import httpx
import aiohttp
HOST, PORT = "localhost", 8000
URL = f"http://{HOST}:{PORT}/"