Skip to content

Instantly share code, notes, and snippets.

@codemis
codemis / gist:8225337
Last active November 9, 2021 12:13
A Git pre-commit hook for validating code follows PHP's Fig Coding Standard. The script requires PEAR's Code Sniffer library. Change the variables to fit your project code structure. Just drop this file in your .git/hooks/ directory. This script is a modified file created by Soenke Ruempler.
#!/bin/bash
# PHP CodeSniffer pre-commit hook for git
#
# @author Soenke Ruempler <soenke@ruempler.eu>
# @author Sebastian Kaspari <s.kaspari@googlemail.com>
#
# see the README
PHPCS_BIN=/usr/local/bin/phpcs
PHPCS_CODING_STANDARD=PSR2
@ivanvermeyen
ivanvermeyen / EnsureQueueListenerIsRunning.php
Last active February 13, 2024 12:40
Ensure that the Laravel queue listener is running with "php artisan queue:checkup" and restart it if necessary. You can run this automatically with a cron job: http://laravel.com/docs/scheduling
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureQueueListenerIsRunning extends Command
{
/**
* The name and signature of the console command.
@lewebsimple
lewebsimple / dropdown-hover.js
Created March 20, 2017 23:53
[Bootstrap 4] Dropdown navbar menu on hover
// Dropdown navbar menu on hover
$('.dropdown-menu', this).css('margin-top', 0);
$('.dropdown').hover(function () {
$('.dropdown-toggle', this).trigger('click').toggleClass("disabled");
});
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 19, 2024 03:49
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+