Skip to content

Instantly share code, notes, and snippets.

@nuxero
nuxero / README.md
Created August 7, 2017 17:07 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@nuxero
nuxero / bookmarklet
Last active September 25, 2017 16:47 — forked from haridsv/bookmarklet
Paste Enabler, remove attributes from form text fields that restrict copy and paste operations. Tested to be working on many financial websites, though on some it causes duplication (workaround: undo).
javascript:s=document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='https://goo.gl/ZKgsbZ';void(0);
var AES = require('crypto-js/aes');
const password = process.env.PASSWORD;
function toHex(encrypted) {
var hex = "";
for (var i = 0; i < encrypted.length; i++) {
hex += encrypted.charCodeAt(i).toString(16)
}
return hex;
@nuxero
nuxero / pagespeed_varnish_cache.config
Last active February 24, 2017 16:37
ebextension for varnish cache + mod_pagespeed
files:
"/etc/nginx/pagespeed.conf":
owner: root
group: root
mode: "000644"
content: |
pagespeed on;
# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/ngx_pagespeed_cache;
@nuxero
nuxero / pagespeed_proxy_cache.config
Last active November 4, 2022 15:24
ebextension config file for pagespeed and proxy cache on nginx
files:
"/etc/nginx/pagespeed.conf":
owner: root
group: root
mode: "000644"
content: |
pagespeed on;
# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/ngx_pagespeed_cache;
files:
"/tmp/45_nginx_https_rw.sh":
owner: root
group: root
mode: "000644"
content: |
#! /bin/bash
CONFIGURED=`grep -c "return 301 https" /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf`
@nuxero
nuxero / customAmiBeanstalkUserParams
Created February 13, 2017 17:11
Custom parameters that have to be added to user parameters for beanstalk custom ami
#cloud-config
repo_releasever: repository version number
repo_upgrade: none