Skip to content

Instantly share code, notes, and snippets.

View SeryiBaran's full-sized avatar
🐒
жоски

SeryiBaran SeryiBaran

🐒
жоски
View GitHub Profile
@k3env
k3env / workflow.yml
Created October 9, 2022 11:52
Depoly react app to gh-pages via actions
# Simple workflow for deploying static content to GitHub Pages
name: Deploy React project to GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@romadryud
romadryud / git-with-presonal-and-work-profiles.md
Last active August 15, 2022 07:35
Using git with personal and work profile

Hi folks! Imagine you have work and personal profile for git on one OS and you want to git select proper email when you do git stuff.

File structure:

home-directory
├── .gitconfig
├── .gitconfig-personal
└── .gitconfig-work
@Priler
Priler / motiondetect.py
Created May 17, 2022 17:15
Python + OpenCV hand motion detection
import cv2
import numpy as np
from collections import deque
from enum import Enum
import time
import pyautogui
# инициализируем
video = cv2.VideoCapture(1) # id устройства камеры
hands_haar_cascade = cv2.CascadeClassifier("rpalm.xml")
@MidSpike
MidSpike / readme.md
Last active January 29, 2025 18:02
CVE-2022-23812 | RIAEvangelist/node-ipc is malware / protest-ware
@entexa
entexa / wsl-web-server.md
Created March 11, 2022 10:12 — forked from positron48/wsl-web-server.md
Поднимаем web-server под WSL (nginx + php-fpm + mysql)

Поднимаем web-server под WSL

Основной стек: nginx + mysql + php-fpm.

Предполагается, что вы только что настроили WSL в своей системе и установили чистую ubuntu 18.04 LTS.

Почему не apache? С точки зрения производительности, быстродействия, а как следствие - нагрузки - связка nginx + php-fpm показывает себя гораздо лучше. Есть в этом решении и минусы - мы лишаемся удобного .htaccess и все необходимые настройки будем вынуждены производить в конфигах nginx и php, но оно того стоит.

const words = [
// Borrowed from xkcd password generator which borrowed it from wherever
"ability","able","aboard","about","above","accept","accident","according",
"account","accurate","acres","across","act","action","active","activity",
"actual","actually","add","addition","additional","adjective","adult","adventure",
"advice","affect","afraid","after","afternoon","again","against","age",
"ago","agree","ahead","aid","air","airplane","alike","alive",
"all","allow","almost","alone","along","aloud","alphabet","already",
"also","although","am","among","amount","ancient","angle","angry",
"animal","announced","another","answer","ants","any","anybody","anyone",
@Priler
Priler / pywebio_online_chat.py
Created October 22, 2021 12:53
Simple online chat on Python in less than 100 lines of code
import asyncio
from pywebio import start_server
from pywebio.input import *
from pywebio.output import *
from pywebio.session import defer_call, info as session_info, run_async, run_js
chat_msgs = []
online_users = set()
@s3rgeym
s3rgeym / Ubuntu-Home-File-Server.md
Last active April 5, 2024 10:30
Домашний файловый сервер на Ubuntu

Домашний файловый сервер на Ubuntu

Установка и настройка Ubuntu

Качаем образ Ubuntu Server и записываем его на флешку:

$ sudo dd if=/home/sergey/Downloads/ubuntu-21.04-live-server-amd64.iso of=/dev/sda conv=fdatasync status=progress
@positron48
positron48 / wsl-web-server.md
Last active December 7, 2024 20:00
Поднимаем web-server под WSL (nginx + php-fpm + mysql)

Поднимаем web-server под WSL

Основной стек: nginx + mysql + php-fpm.

Предполагается, что вы только что настроили WSL в своей системе и установили чистую ubuntu 18.04 LTS.

Почему не apache? С точки зрения производительности, быстродействия, а как следствие - нагрузки - связка nginx + php-fpm показывает себя гораздо лучше. Есть в этом решении и минусы - мы лишаемся удобного .htaccess и все необходимые настройки будем вынуждены производить в конфигах nginx и php, но оно того стоит.

@sindresorhus
sindresorhus / esm-package.md
Last active July 2, 2025 19:35
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.