Skip to content

Instantly share code, notes, and snippets.

@abhishekbhardwaj
abhishekbhardwaj / Dockerfile
Created October 14, 2018 11:32
Add Nginx to WordPress's official FPM binaries and let users customize php settings
FROM wordpress:4.9-php7.2-fpm-alpine
# Install the extra packages.
RUN apk --no-cache add nginx supervisor curl
# Copy all files.
COPY ./php.ini $PHP_INI_DIR/conf.d/wp_php.ini
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Disable default entrypoint.
ENTRYPOINT []
# Expose Nginx on 80.
@abhishekbhardwaj
abhishekbhardwaj / .eslintrc
Created September 21, 2018 06:12
Setup ESLint + Prettier in CRA Apps
{
"extends": [
"react-app",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended"
],
"plugins": ["jsx-a11y", "prettier"],
"rules": {
"prettier/prettier": [
"error",
@abhishekbhardwaj
abhishekbhardwaj / php71.sh
Created January 15, 2017 03:00
Install PHP7.1 on OSX with Homebrew
brew update
brew upgrade
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php71
## To use PHP7.1 on CLI, add this to .bash_profile
#include <stdio.h>
int main(void) {
int m = 11, n = 22;
int *p = &m, *q = &n; //11, 22
printf("%d %d\n", *p, *q);
int **pp = &p, **qq = &q; //11, 22
printf("%d %d\n", **pp, **qq); //