Skip to content

Instantly share code, notes, and snippets.

View kefzce's full-sized avatar
🏠
Working from home

kefzce

🏠
Working from home
View GitHub Profile
Title Change password
URL /api/users/passwordChange
Method POST
Headers Authorization=Bearer token
Content-type: application/json
Params password=current password
newPassword=new password
Data Params example
{
"password": "password",
"newPassword": "pass"
}
Success Response example{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9"}
<?php
$finder = PhpCsFixer\Finder::create()
->files()
->name('*.php')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests');
return PhpCsFixer\Config::create()
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules([
@kefzce
kefzce / git-deployment.md
Created July 5, 2017 05:55 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

Keybase proof

I hereby claim:

  • I am kefzce on github.
  • I am systemfailure (https://keybase.io/systemfailure) on keybase.
  • I have a public key whose fingerprint is 1C3E CE0A A891 3941 6C3D 47E1 A209 7373 E5A1 0DA5

To claim this, I am signing this object:

1. Почему вы выбрали именно нашу компанию?
Вы идиот (ка), да? Я, как и все кандидаты до меня и после меня, направил резюме в десяток мест.
Где устроюсь быстрее и выгоднее — там и хорошо.
2. Как вы считаете, почему мы должны выбрать именно вас?
Вам работники вообще нужны? Ну вот он я. Работник.
Именно меня стоит выбрать хотя бы потому, что я явно умнее всех тех, кто заливал на эти вопросы стандартную чушь.
И умнее вас, между прочим, потому что я никогда таких дурацких вопросов бы не задал.
@kefzce
kefzce / weather.sh
Created September 9, 2017 23:02 — forked from taylorotwell/weather.sh
Weather CLI
alias weather='curl -s wttr.in | sed -n "1,7p"'
@kefzce
kefzce / lp_counters.py
Created November 3, 2017 03:23 — forked from devdazed/lp_counters.py
Simple Linear Probabilistic Counters
"""
Simple Linear Probabilistic Counters
Credit for idea goes to:
http://highscalability.com/blog/2012/4/5/big-data-counting-how-to-count-a-billion-distinct-objects-us.html
http://highlyscalable.wordpress.com/2012/05/01/probabilistic-structures-web-analytics-data-mining/
Installation:
pip install smhasher
pip install bitarray
<?php
try {
/** @var \Telegram\Bot\Objects\User $userUpdate */
$userUpdate = $update->getFrom();
/** @var \Telegram\Bot\Objects\Chat $chatUpdate */
$chatUpdate = $update->getChat();
$userExist = User::where('user_id', '=', $userUpdate->getId())->first();
$chatExist = Chat::where('chat_id', '=', $chatUpdate->getId())->first();
@kefzce
kefzce / ExamplePassportTest.php
Created February 12, 2018 08:53 — forked from archy-bold/ExamplePassportTest.php
Testing Passport Authenticated Controllers and Routes in Laravel
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExamplePassportTest extends \PassportTestCase
{
use DatabaseTransactions;
@kefzce
kefzce / logslaravel.sh
Created August 19, 2018 11:18 — forked from jakebathman/logslaravel.sh
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color