Skip to content

Instantly share code, notes, and snippets.

@tamhv
tamhv / gist:d11204b2c4224f4f0b03ba9aa422a40c
Created November 26, 2018 09:34
centos 7 docker container connect to host on port 443
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload
@tamhv
tamhv / redux.js
Created March 21, 2018 02:36
reset redux state by action
# delete all state alter log out
const appReducer = combineReducers({
todos,
visibilityFilter
});
const rootReducer = ( state, action ) => {
if ( action.type === LOG_OUT ) {
state = undefined;
}
@tamhv
tamhv / settings.py
Created November 3, 2017 10:18
celery django test config
# celery==4.1.0
# django==1.11.x
# execute task synchronous
CELERY_TASK_ALWAYS_EAGER = True
# raise exception in task
CELERY_TASK_EAGER_PROPAGATES = True