Skip to content

Instantly share code, notes, and snippets.

View kefzce's full-sized avatar

kefzce

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"}
@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.

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
@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
@kefzce
kefzce / pre-commit
Created September 20, 2018 19:52 — forked from fesor/pre-commit
php-cs-fixer pre-commit hook
#!/usr/bin/env bash
echo "php-cs-fixer pre commit hook start"
PHP_CS_FIXER="bin/php-cs-fixer"
PHP_CS_CONFIG=".php_cs"
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACM -- '*.php')
if [ -n "$CHANGED_FILES" ]; then
$PHP_CS_FIXER fix --config "$PHP_CS_CONFIG" $CHANGED_FILES;
git add $CHANGED_FILES;
@kefzce
kefzce / states_hash.json
Created September 26, 2018 11:28 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",