Skip to content

Instantly share code, notes, and snippets.

View lov3catch's full-sized avatar
☺️
🐍 Python / 🐘 PHP / 🚀 Racket

ihor.kpl lov3catch

☺️
🐍 Python / 🐘 PHP / 🚀 Racket
View GitHub Profile
@yogthos
yogthos / clojure-beginner.md
Last active May 6, 2024 08:11
Clojure beginner resources

Introductory resources

@baptx
baptx / instagram-api_send_message.js
Last active December 3, 2023 05:46
Instagram API: send direct messages from a web browser
/*
Instagram API: send direct messages from a web browser
Since April 2020, Instagram has a web version to send and read direct messages so my Instagram scripts are not longer needed and I would not recommend using them unless you really need it, to avoid being banned
(never happened to me with Instagram but WhatsApp is owned by Facebook also and they did it to users registering from an unofficial app like yowsup: https://github.com/tgalal/yowsup/commit/88b8ad9581fa22dac330ee3a05fec4e485dfa634#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5)
For browser setup, see script instagram-api_direct_messages_backup.js
Instagram web version sessionid cookie does not allow sending messages so we need to log in manually
Signature should match signed_body data (using HMAC-SHA256 with private key) but wrong signature or key may work also.
@hindol
hindol / clojure_in_15_minutes.md
Last active August 8, 2021 15:51
Clojure in 15 Minutes: A Crash-course

Clojure in 15 Minutes

Hello, Clojure!

(println "Hello, world!")
  • The same in Python,
https://github.com/beberlei/assert
Список мастхев либ и возможно какие-то мысли.
https://github.com/bocharsky-bw/Arrayzy
https://github.com/php-ds/ext-ds
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@giansalex
giansalex / docker-php-ext-install.md
Last active October 3, 2023 10:02
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
@zmts
zmts / tokens.md
Last active May 24, 2024 18:51
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@haringsrob
haringsrob / .vimrc
Created March 1, 2017 16:20
NeoVim as php IDE - Single file setup
call plug#begin('~/.local/share/nvim/plugged')
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'martinda/Jenkinsfile-vim-syntax'
Plug 'c9s/phpunit.vim'
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'kien/ctrlp.vim'
Plug 'easymotion/vim-easymotion'
Plug 'StanAngeloff/php.vim'

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@kyptov
kyptov / rabbitmq_cheatsheet_ru.md
Last active February 11, 2024 21:18
RabbitMQ Cheat Sheet (russian)

Общие упрощенные понятия. Возможно существуют способы задать другое поведение нежели данное упощенное.

Понятия

  • producer - отправитель, программный код, который отправляет сообщение.
  • consumer - получатель, программный код, который должен получить сообшение.
  • exchange - обменник, функционал RabbitMQ, получает сообщение с заданными параметрами от отправителя и:
    • может сбросить(удалить) сообщение или вернуть отправителю (зависит от атрибутов сообщения),
    • может отправить сообщение в очередь,
    • может отправить сообщение в несколько очередей (сообщение будет скопировано для каждой очереди)
  • queue - очередь, функционал RabbitMQ, хранит все сообщения и раздает их получателям.
  • message - сообщение, содержит атрибуты необходимые RabbitMQ, а также данные для передачи от отправителя к получателю