Skip to content

Instantly share code, notes, and snippets.

View benfavre's full-sized avatar
💻
At the office

Webdesign29 benfavre

💻
At the office
View GitHub Profile
@benfavre
benfavre / .env.example
Created September 26, 2016 15:13
ENV file example
APP_DATABASE_NAME=%database_name%
APP_DATABASE_USER=%database_user%
APP_DATABASE_PASSWORD=%database_password%
APP_DATABASE_HOST=%database_host%
APP_ENV=%app_environment%
@benfavre
benfavre / xdebug-windows.ini
Last active October 7, 2016 15:31
Example XdebugConfig Windows
[XDebug]
zend_extension=php_xdebug.dll
xdebug.cli_color = 1
xdebug.overload_var_dump = 1
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = 4096
xdebug.var_display_max_depth = 10
xdebug.max_nesting_level = 250
xdebug.remote_enable=1
@benfavre
benfavre / xdebug-linux.ini
Last active October 7, 2016 15:56
Example XdebugConfig Linux /etc/php/7.0/mods-available/xdebug.ini
[XDebug]
zend_extension=xdebug.so
xdebug.default_enable = 0
xdebug.cli_color = 1
xdebug.overload_var_dump = 1
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = 4096
xdebug.var_display_max_depth = 10
xdebug.max_nesting_level = 250
@benfavre
benfavre / README.md
Created October 26, 2016 23:44 — forked from dbu/README.md
Convert NelmioApiDocBundle annotations to Swagger PHP

A Symfony command to convert from NelmioApiDocBundle annotations to Swagger-PHP annotations.

This code is provided as is. Make sure to have your code committed to version control before running the command. Check if things work out and if not, use version control to reset the automated changes and fix the command.

@benfavre
benfavre / gen.sh
Created January 15, 2017 00:15 — forked from thomasyip/gen.sh
Generate self-signed alternate dns (wildcard) ssl certificate with a single script
#!/bin/bash
# file: gen.sh
# usage: ./gen.sh [name]
ROOT=rootCA
NAME=${1:-device}
EXTS=( key cnf csr crt )
ROOT_NAME=rootCA
ROOT_EXTS=( key pem )
@benfavre
benfavre / Dockerfile
Created January 17, 2017 23:23 — forked from jmyrland/Dockerfile
Docker mounted volume removes node_modules
# Set the base image to stable version of node
FROM node:0.12.2
# Install nodemon
RUN npm install -g nodemon
# Provides cached layer for node_modules
COPY package.json /tmp/package.json
RUN cd /tmp && npm install --production
RUN mkdir -p /app && cp -a /tmp/node_modules /app/
@benfavre
benfavre / Makefile
Created February 27, 2017 00:26 — forked from f440/Makefile
Makefile for docker project
NS ?= $(shell whoami)
REPO ?= $(shell basename $(shell pwd))
VERSION ?= latest
CONTAINER = $(NS)-$(REPO)
.PHONY: build
build:
docker build -t $(NS)/$(REPO):$(VERSION) .
@benfavre
benfavre / dos2unix.sh
Created February 28, 2017 10:33
Convert all files in folder to linux line endings
find . -type f -print0 | xargs -0 dos2unix
@benfavre
benfavre / daemon.json
Created May 2, 2017 12:04
Increase device mapper size for docker
#/etc/docker/daemon.json
{
"storage-opts": [
"dm.basesize = 20G"
],
"storage-driver": "devicemapper"
}
@benfavre
benfavre / golang.sh
Created May 9, 2017 17:12
Install Golang ubuntu 16.04
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install golang-go