Skip to content

Instantly share code, notes, and snippets.

@msacar
msacar / README.md
Created October 12, 2018 08:08 — forked from magnetikonline/README.md
Nginx FastCGI cache configuration example.

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
@msacar
msacar / notification.php
Last active December 29, 2019 22:42
notification.php
<?php
$user = \App\User::first();
$user->notify(new \App\Notifications\SubscriptionStarted());
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class SubscriptionStarted extends Notification
{
<?php
namespace App\Models;
use Jenssegers\Mongodb\Eloquent\Model;
class MongoNotification extends Model
{
protected $connection = "mongodb";
protected $table = "notifications";
curl -k -s -w "Connect time: %{time_connect} Time to first byte: %{time_starttransfer} Total time: %{time_total} \n" -o /dev/null https://emlaksitem.com/

🚀 Projemizi oluşturalım!

Klasörümüzü açıp içerisine gidiyoruz.

mkdir babel-webpack && cd babel-webpack

Babel ve Webpack kuruyoruz

npm init -y 
npm install --save-dev  @babel/core babel-loader @babel/preset-env
npm install --save-dev webpack webpack-cli webpack-dev-server
src ve dist klasörlerimizi oluşturalım
```
mkdir src dist
```
@msacar
msacar / Person.js
Created May 1, 2020 16:19
src/Person.js
class Person {
constructor(name){
this.name = name
}
work(){
console.log(`${this.name} has no job to`)
}
}
export { Person }
@msacar
msacar / Student.js
Created May 1, 2020 16:22
src/Student.js
import {Person} from './Person';
class Student extends Person {
constructor(name){
super(name)
this.job = "Student"
}
work(){
console.log(`${this.name} Studying.`)
}
@msacar
msacar / Teacher.js
Created May 1, 2020 16:24
src/Teacher.js
import {Person} from './Person';
class Teacher extends Person {
constructor(name){
super(name)
this.job = "Teacher"
}
work(){
console.log(`${this.name} Teaching.`)
}