Skip to content

Instantly share code, notes, and snippets.

View ayoubbensakhria's full-sized avatar

Ayoub Bensakhria ayoubbensakhria

View GitHub Profile
@ayoubbensakhria
ayoubbensakhria / wordToSyllables.cs
Last active April 4, 2020 20:02
Word To Syllables
//Usage
wordToSyllables wTS = new wordToSyllables();
List < string > syllablesList = new List < string > ();
wTS.Word = "Gesellschaft";
syllablesList = wTS.Syllables();
@ayoubbensakhria
ayoubbensakhria / fbuilder.dart
Created April 15, 2020 02:11
Flutter Future Builder : Widgets with an Async Method Call with Best Flutter Practices
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(home: Scaffold(body: Center(child: MyWidget()))));
Future<String> callAsyncFetch() => Future.delayed(Duration(seconds: 2), () => "hi");
class MyWidget extends StatelessWidget {
@override
Widget build(context) {
return FutureBuilder<String>(
import {HttpClient} from '@angular/common/http';
import {Component, ViewChild, AfterViewInit} from '@angular/core';
import {MatPaginator} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import {merge, Observable, of as observableOf} from 'rxjs';
import {catchError, map, startWith, switchMap, debounceTime} from 'rxjs/operators';
import { Patient } from 'src/app/common/patient';
import {MatDatepickerInputEvent} from '@angular/material/datepicker';
/**
<div class="dynamic-table-container mat-elevation-z8">
<div class="card-header-tab card-header">
<div class="card-header-title font-size-lg text-capitalize font-weight-normal">
PATIENTS
</div>
<div class="btn-actions-pane-right">
<div role="group" class="btn-group-sm btn-group">
<button class="mb-2 mr-2 btn-icon btn-pill btn btn-success" (click)="refresh()">
<i class="fa fa-refresh btn-icon-wrapper"></i>
Actualiser
/* Structure */
.dynamic-table-container {
position: relative;
}
.dynamic-table-table-container {
position: relative;
max-height: 400px;
overflow: auto;
}
PHP_VERSION=7.4
MYSQL_VERSION=8
APACHE_VERSION=2.4.32
DB_ROOT_PASSWORD=root
DB_NAME=promed
DB_USERNAME=user
DB_PASSWORD=root
PROJECT_ROOT=./public_html
ServerName localhost
LoadModule deflate_module /usr/local/apache2/modules/mod_deflate.so
LoadModule proxy_module /usr/local/apache2/modules/mod_proxy.so
LoadModule proxy_fcgi_module /usr/local/apache2/modules/mod_proxy_fcgi.so
<VirtualHost *:80>
# Proxy .php requests to port 9000 of the php-fpm container
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://php:9000/var/www/html/$1
FROM httpd:2.4.33-alpine
RUN apk update; \
apk upgrade;
# Copy apache vhost file to proxy php requests to php-fpm container
COPY apache.conf /usr/local/apache2/conf/apache.conf
RUN echo "Include /usr/local/apache2/conf/apache.conf" \
>> /usr/local/apache2/conf/httpd.conf
FROM php:7.2.7-fpm-alpine3.7
RUN apk update; \
apk upgrade;
RUN docker-php-ext-install mysqli
MYSQL_VERSION=8
APACHE_VERSION=2.4.32
DB_ROOT_PASSWORD=root
DB_NAME=db
DB_USERNAME=user
DB_PASSWORD=root
PROJECT_ROOT=./public_html