Skip to content

Instantly share code, notes, and snippets.

Vedmant vedmant

Block or report user

Report or block vedmant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vedmant
vedmant / TracksEmails.php
Created May 18, 2017
Helper for testing emails with Laravel
View TracksEmails.php
<?php
namespace Tests;
use Mail;
use Swift_Events_EventListener;
use Swift_Events_SendEvent;
use Swift_Mime_Message;
/**
@vedmant
vedmant / laravel-deploy.sh
Last active Sep 21, 2018
A script for deploying Laravel application, includes maintenance mode, composer, migrations, clearing cache and restart queues
View laravel-deploy.sh
#!/bin/bash
NO_DEV="--no-dev"
if [[ $1 == "dev" ]]; then
NO_DEV=""
fi
git fetch
View gist:ffe64fdd70c6da2bed467a1d33cb7817
[12752408:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /home/vedmant/.motion/motion.conf
[12752408:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started
[12752408:motion] [NTC] [ALL] motion_startup: Logging to syslog
[12752408:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (INF)
[12752408:motion] [INF] [ALL] conf_output_parms: Writing configuration parameters from all files (1):
[12752408:motion] [INF] [ALL] Thread 0 - Config file: /home/vedmant/.motion/motion.conf
[12752408:motion] [INF] [ALL] daemon off
[12752408:motion] [INF] [ALL] process_id_file /var/run/motion/motion.pid
[12752408:motion] [INF] [ALL] setup_mode off
[12752408:motion] [INF] [ALL] log_level 7
View Symfony 2 Nginx configuration with php-fpm and maintenance file
# List of upstream php servers
upstream project_php_fpm {
least_conn;
ip_hash;
server 127.0.0.1:9101;
server 127.0.0.1:9102;
}
proxy_cache_path /home/user/project/nginx/cache levels=1:2 keys_zone=project_cache:10m max_size=10g inactive=60m; # use_temp_path=off;
View init.d service script
#!/bin/sh
### BEGIN INIT INFO
# Provides: <NAME>
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: <DESCRIPTION>
### END INIT INFO
You can’t perform that action at this time.