Skip to content

Instantly share code, notes, and snippets.

View andrnag's full-sized avatar

Andrey andrnag

View GitHub Profile
@cyberpunk042
cyberpunk042 / debian12_configuration_script.sh
Last active October 8, 2025 07:01
TrueNAS Scale 24.04.2 Customization
#!/bin/bash
# Set script to exit on error
set -e
# Enable logging
exec > >(tee -i /var/log/setup-script.log)
exec 2>&1
echo "Starting script execution..."
@emplums
emplums / events.md
Last active August 8, 2022 08:16
React 17 & Event Handling

Untitled-2020-12-22-1119-3

In React 17, event listeners are attached to the node that your React application is using as the root node, instead of the document. In the diagram above, that would be the div under body.

Previously, if you called e.stopPropagation in a React event handler (say the menu component in the diagram), the event would bubble up to the document anyways, and if you had a listener on the document it would get called.

  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"
@tenphi
tenphi / meetup-checklist.md
Created April 3, 2018 08:23
Meetup checklist
  • Контакт ответственного человека
  • Адрес площадки
  • Кол-во мест на площадке (желательно фото)
  • Предполагается ли какой-то кейтеринг
  • Какое оборудование на площадке
  • Организуется ли запись докладов, видеотрансляцию, фотографа
  • Система пропусков
  • Технические детали подключения к проектору. Пропорции экрана проектора. Было бы здорово, чтобы докладчик мог легко подключить свой ноут, независимо от ОС.
  • Подключение докладчика. Какие микрофоны, есть ли монитор для докладчика, есть ли стойка для ноута и т.п.
  • Условия компании: свой докладчик, своя мини-презентация компании, экскурсии и другое
@raineorshine
raineorshine / commit-author.sh
Created October 12, 2017 17:09
Set git commit author for a single repository
git config user.name "ShapeShift-Public"
git config user.email "mail@hshapeshift.io"
https://help.github.com/articles/setting-your-username-in-git/#setting-your-git-username-for-a-single-repository
@asukakenji
asukakenji / 0-go-os-arch.md
Last active August 5, 2025 19:35
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@obenjiro
obenjiro / validation.md
Last active May 8, 2018 06:19
Валидация: Эра Парсеров
@jnovack
jnovack / README.md
Last active November 1, 2023 23:07
Proxy SSL Client Certificate through NGINX Load-Balancer

Proxy SSL Client Certificate through NGINX Load-Balancer

The frontend stream proxy_pass can be used for load-balancing without SSL off-loading. All SSL connections will be terminated on the backend and client certificate information can be properly authenticated.

This should be used in cases:

  • you have enough CPU to decrypt SSL on the backend servers
  • you require direct client AUTHENTICATION on the backend servers

Backend

@akella
akella / setup.md
Last active February 21, 2023 22:59
Мой сетап

То что я использую в работе и стримах

Софт для разработки

@zmts
zmts / tokens.md
Last active October 2, 2025 11:04
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов