Skip to content

Instantly share code, notes, and snippets.

@ferry77
ferry77 / bootstrap-plugins.txt
Created November 20, 2012 00:52 — forked from mklabs/bootstrap-plugins.txt
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated with https://github.com/barryvdh/laravel-ide-helper
* Updated for Laravel 4.1.8 (2013-12-13)
*
* @author Barry vd. Heuvel <[email protected]>
*/
exit('Only to be used as an helper for your IDE');
@ferry77
ferry77 / gist:80b34c208ec4865c6b66
Created April 13, 2015 12:41
Mysqldump all database to individual file
mysql -u[uname] -p[password] -e "show databases" | grep -Ev 'Database|information_schema' | while read dbname; do mysqldump -u[uname] -p[password] $dbname > ~/db_backup/$dbname.sql; done
@ferry77
ferry77 / nginx.conf
Created March 15, 2017 03:36
Amazon AMI nginx.conf adjusted for Laravel
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@ferry77
ferry77 / www.conf
Created March 15, 2017 03:37
Amazon AMI PHP-FPM www.conf
[www]
user = ec2-user
group = www
listen = /var/run/php-fpm.sock
listen.acl_users = apache,nginx
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
@ferry77
ferry77 / config
Last active April 24, 2023 15:21
SSH connect to a server via JumpHost
# +-------+ +----------+ +-----------+
# | Laptop| <---> | Jumphost | <--> | FooServer |
# +-------+ +----------+ +-----------+
Host JumpHost
User ec2-user
HostName xx.xx.xx.01
# Add these 2 lines so we don't have to manually run 'ssh-add [key]'
UseKeychain yes
AddKeysToAgent yes
@ferry77
ferry77 / .php_cs
Last active February 4, 2018 23:53
PHP CS FIXER config
<?php
return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,
'array_syntax' => array('syntax' => 'short'),
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,
'single_quote' => true,
@ferry77
ferry77 / prepare-commit-msg.sh
Last active June 26, 2018 06:24 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"