Skip to content

Instantly share code, notes, and snippets.

View aurelmegn's full-sized avatar

Aurel aurelmegn

View GitHub Profile
import sys
from os import makedirs, mkdir
from os.path import abspath, isdir
from typing import List
from flask_security.utils import verify_password
from pyftpdlib.authorizers import AuthenticationFailed, DummyAuthorizer
sys.path.append(".")
sys.path.append("../")
#!bin/sh
composer install --no-dev --optimize-autoloader
yarn install --prod
yarn run build
php bin/console cache:clear --env=prod --no-debug
MAIL_TOKEN="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"
EMAIL_NAME="no-reply@hitotec.com"
MONGO_INSTANCE="mongodb://dev.hitotec:SoftWare2017!@ds123946.mlab.com:23946/hitotec_dating_app"
PORT=3000
#!/bin/bash
# Flush iptables.
iptables -F
iptables -X
# /!\ ne pas rejeter une connexion existante entrante
iptables -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
@aurelmegn
aurelmegn / .zshrc
Created September 21, 2017 22:40
Alias for symfony's console command
## COMPOSER ALIAS
alias cii="composer install --ignore-platform-reqs"
alias cui="composer update --ignore-platform-reqs"
## SYMFONY ALIAS
# Console
alias sf="php bin/console"
alias sfdev="php bin/console --env=dev"
@aurelmegn
aurelmegn / angular-http-cache.service.ts
Last active September 3, 2017 09:30
An http service for angular 4 which use the cache to store and retrieve data
import {Injectable} from '@angular/core'
import {Response, Headers, Http, RequestOptions} from '@angular/http';
import { Observable } from 'rxjs/Rx';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
import {SessionStorageService} from 'ngx-webstorage';
import {ApiUrls, server, STORAGE} from '../parameters';
@Injectable()
export class HttpService {