Skip to content

Instantly share code, notes, and snippets.

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

Aleksandr Pankov PankovAlxndr

🏠
Working from home
  • alpacamed.com
  • Russia, Yaroslavl
  • 19:51 (UTC +03:00)
View GitHub Profile
@cyppe
cyppe / gist:3a099fb97273f5ac08c6bb215792b538
Last active February 18, 2024 08:27
RedisBatchRepository for using Redis as the batch jobs driver in Laravel
<?php
namespace App\Repositories;
use Carbon\CarbonImmutable;
use Closure;
use DateTimeInterface;
use Illuminate\Bus\BatchFactory;
use Illuminate\Bus\BatchRepository;
use Illuminate\Bus\PendingBatch;
@adrianorsouza
adrianorsouza / laravel_path_permissions.sh
Last active November 25, 2023 23:53
Laravel storage path permissions. This script makes storage path writable for both users, the admin and PHP Webserver user
#!/bin/bash
#
# DEFINE PROPER WRITABLE PERMISSIONS FOR LARAVEL PROJECT.
# Run this script in a fresh Laravel install.
#
# @author Adriano Rosa (https://adrianorosa.com)
# @created: 2015-02-15 00:59:19
# @updated: 2021-01-28 14:19:16
# @updated: 2023-11-25 20:53:36
#
@pmkay
pmkay / installing-postman.md
Created April 27, 2020 02:49 — forked from ba11b0y/installing-postman.md
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz

Более удобной и актуальной версией является эта статья с использованием traefik

https://gist.github.com/dancheskus/365e9bc49a73908302af19882a86ce52


Certbot и nginx, как обратный прокси в Docker (пример с 2 react проектами)

В результате будет 2 react проекта на 1 сервере доступных по разным ссылкам

@davalapar
davalapar / downloadFile.js
Created July 31, 2018 12:08 — forked from dreamyguy/downloadFile.js
Download response.data as a file, through Blob()
// 'downloadFile.js', written by blending two solutions:
// 'js-download' https://github.com/kennethjiang/js-file-download
// 'Anders Paulsen' https://blog.jayway.com/2017/07/13/open-pdf-downloaded-api-javascript/
export function downloadFile(data, filename, mime) {
// It is necessary to create a new blob object with mime-type explicitly set
// otherwise only Chrome works like it should
const blob = new Blob([data], {type: mime || 'application/octet-stream'});
if (typeof window.navigator.msSaveBlob !== 'undefined') {
// IE doesn't allow using a blob object directly as link href.
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active December 4, 2025 12:18
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@zmts
zmts / tokens.md
Last active December 3, 2025 15:55
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm