Skip to content

Instantly share code, notes, and snippets.

View omar331's full-sized avatar
🏠
Working from home

Omar Alves omar331

🏠
Working from home
View GitHub Profile
@peteristhegreat
peteristhegreat / server.hot.reload.js
Created August 3, 2018 14:57
Webpack Hot Reload over NFS, WatchOptions, config
# Based on https://github.com/MacKentoch/react-redux-bootstrap-webpack-ssr-starter.git project...
# In order to work with edits that happen on a remote NFS/network drive, you need to use polling.
# See where watchOptions are set below for it to happen.
const path = require('path');
const webpack = require('webpack');
const express = require('express');
const devMiddleware = require('webpack-dev-middleware');
const hotMiddleware = require('webpack-hot-middleware');
const config = require('./webpack.hot.reload.config');
@kovagoz
kovagoz / Dockerfile
Created September 2, 2016 05:03
Alpine Linux with PHP 5.6 FPM and Mongo module
FROM php:5.6-fpm-alpine
RUN apk update && apk add autoconf openssl-dev g++ make && \
pecl install mongo && \
docker-php-ext-enable mongo && \
apk del --purge autoconf openssl-dev g++ make
@kentatogashi
kentatogashi / kill_zombie_firefox
Last active July 22, 2019 14:10
Kill zombie process of firefox during the time that you execute automation test through the selenium web driver and the firefox browser
#!/usr/bin/env bash
# Author: Kenta Togashi
INTERVAL=5
COUNT=0
while :
do
sleep $INTERVAL
ZOMBIE_FIREFOX_PID=`ps aux | grep 'firefox' | grep '[-]silent' | awk '{print $2}'`
@marzocchi
marzocchi / controller.php
Created August 2, 2012 15:12
Change a Doctrine entity's table name at runtime
<?php
class FooController extends Controller {
function fooAction() {
$em = $this->getDoctrine()->getEntityManager();
$cm = $em->getClassMetadata('FooBundle:FooEntity');
$cm->setTableName('special_table_name');