Skip to content

Instantly share code, notes, and snippets.

View PeterZhukov's full-sized avatar

Peter Zhukov PeterZhukov

View GitHub Profile
@PeterZhukov
PeterZhukov / Readme.md
Last active February 7, 2026 13:09
Yii2 Sign In With Apple

Что это

Мы внедряли Sign In With Apple на сайте, здесь инструкция для PHP для внедрения кнопки Sign In Witn Apple на сайт в фреймворке Yii 2

Пакеты

yiisoft/yii2-authclient - поддержка OAuth 2 в Yii 2

firebase/php-jwt - Apple использует JWT токены

package com.example.helloworld;
public class Shift {
public static void showShift(){
//byte val = 1; int tmp;
byte val = (byte) (1 << 7); int tmp;
int r;
for(int i = 0; i < 32; i++){
tmp = val;
//tmp <<= i;
@PeterZhukov
PeterZhukov / main_script.php
Created May 29, 2019 12:43
Git lines by author
<?php
//git log --stat --since="2018-08-02" | grep -v vendor | grep "( \| )|(Author: )" > programmers.log 2>&1
//php main_script.php
$data = file_get_contents(__DIR__.'/programmers.log');
$data = explode("\n", $data);
$authors = [];
$currentAuthor = '';
$lines = 0;