Skip to content

Instantly share code, notes, and snippets.

View Jeket's full-sized avatar

Jeket Jeket

View GitHub Profile
@Jeket
Jeket / debian_do.md
Created October 25, 2021 17:17 — forked from zmts/debian_do.md
Первичная настойка Debian Linux/Разворачиваем серверную инфраструктуру на Digital ocean

Первичная настойка Debian Linux/Разворачиваем серверную инфраструктуру на Digital ocean

Для проектов среднего и небольшого размера не всегда оправданно использовать AWS/Kubernetes подобную технологию. Для проектов нуждающихся в нескольких серверах отлично подходит Digital ocean. Который к тому же предоставляет средства вертикального скейлинга(увеличение производительной мощности уже существующих серверов).

SSH cертификат

Создаем сертификат под которым будем логинится на сервера нашего проекта (на локальной машине)

ssh-keygen -t rsa -b 4096 -f /Users/alex/.ssh/myproject_test -C "myproject comment"

Не забываем сделать его бекап

@Jeket
Jeket / ssh_cert.md
Created October 25, 2021 17:16 — forked from zmts/ssh_cert.md
ssh cert to remote server access

SSH cert to remote server access

Generate ssh certificate with unique filename. Stroring keys in separate files will help make backup without not related keys.

➜ cd /Users/alex/.ssh
➜ ssh-keygen -t rsa -b 4096 -f myproject_test -C "myproject comment"
Generating public/private rsa key pair.
@Jeket
Jeket / pg_jsonb_push.md
Created October 25, 2021 17:16 — forked from zmts/pg_jsonb_push.md
Insert(push) object to nested array. JSONB PostgreSQL

Insert(push) object to nested array. JSONB PostgreSQL

// posts table

| id | content          |
|----|------------------|
| 40 | jsonb data       |
@Jeket
Jeket / imageSize.md
Created October 25, 2021 17:15 — forked from zmts/imageSize.md
Get image width and height with JavaScript

Get image width and height with JavaScript

function imageSize (image) {
  return new Promise((resolve, reject) => {
    try {
      const fileReader = new FileReader()

      fileReader.onload = () => {
 const img = new Image()
@Jeket
Jeket / dockerToLocalhost.md
Created October 25, 2021 17:15 — forked from zmts/dockerToLocalhost.md
Get access to localhost database from docker container

Get access to localhost database from docker container

  • Run containerized application on 0.0.0.0 address
  • Use host.docker.internal as database hostname
@Jeket
Jeket / tokens.md
Created October 19, 2021 13:10 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 25.08.2020

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

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@Jeket
Jeket / forcefully_remove_mdm_1015.sh
Created October 6, 2021 03:20 — forked from opragel/forcefully_remove_mdm_1015.sh
forcefully_remove_mdm_1015.sh
#!/bin/bash
# Seriously there still apparently aren't enough warning labels
# If you don't understand the consequences don't do it
REMOVE_PATHS=( # "/var/db/ConfigurationProfiles/.passcodePolicesAreInstalled"
# "/var/db/ConfigurationProfiles/.cloudConfigHasActivationRecord"
# "/var/db/ConfigurationProfiles/.cloudConfigNoActivationRecord"
# "/var/db/ConfigurationProfiles/.cloudConfigProfileObtained"
# "/var/db/ConfigurationProfiles/.cloudConfigRecordFound"
# "/var/db/ConfigurationProfiles/.profilesAreInstalled"
@Jeket
Jeket / README.ja.md
Created April 7, 2021 09:45 — forked from niw/README.en.md
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

ARM 版 Windows 10 や Ubuntu for ARM64 を Apple Silicon な Mac で動かす

ARM 版 Windows 10 や Ubuntu を Apple Silicon な Mac で動かす簡単な方法です。

メモ: 2021年2月8日現時点での方法で、今後まだ改善されていくと思います。

ARM 版 Windows 10 を動かす

  1. Xcode を App Store で、あるいは Command Line Tools を Apple Silicon な Mac にインストール
@Jeket
Jeket / temporary-email-address-domains
Created March 24, 2021 06:12 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com