View human-readable-date.pipe.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
import * as moment from 'moment'; | |
import 'moment/locale/tr'; | |
@Pipe({ | |
name: 'humanReadableDate', | |
}) | |
export class HumanReadableDatePipe implements PipeTransform { | |
transform(date: Date) { | |
const now = moment(); |
View datetime-difference-detector.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const now = new Date(); | |
const scheduledDate = new Date(this.element.scheduledDate); | |
const diff = scheduledDate.getTime() - now.getTime(); | |
diff < 0 ? (this.showWarningColor = true) : (this.showWarningColor = false); |
View foo.entity.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity() | |
@ObjectType() | |
export class Foo extends BaseEntity { | |
@PrimaryGeneratedColumn('uuid') | |
@Field(() => ID) | |
id: string; | |
@Column() | |
@Field() | |
title: string; |
View slider.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="slider" class="relative flex-col justify-center items-center pt-5" x-data="slider(6000)"> | |
<div class="relative overflow-hidden rounded shadow"> | |
<!-- progress bar --> | |
<div id="slider-progress-bar" class="block h-4 bg-indigo-400"></div> | |
<!-- item 1 --> | |
<div x-show="active === 1" data-slider-item> | |
<div class="text-white font-bold absolute text-4xl bottom-1 right-1">1 / 3</div> | |
<img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1520&q=80" | |
loading="lazy" alt=""> | |
<div class="text-white font-bold absolute text-4xl bottom-1 left-1">Caption Text 1</div> |
View refetch.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refetchHander(appState: AppState): MutationBaseOptions { | |
const refetchQueries = [ | |
{ | |
query: this.coordinatesTableGQL.document, | |
variables: { | |
filter: { | |
skip: 0, | |
take: 10, | |
}, | |
}, |
View avoid-border-conflict.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrapper { | |
@apply overflow-hidden shadow ring-1 ring-black ring-opacity-5 rounded-lg; | |
} | |
.item { | |
@apply bg-white; | |
} | |
.item:not(:nth-child(1)) { | |
@apply border-t border-gray-200; |
View Payfor3D.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Classes; | |
class Payfor3D | |
{ | |
public string $MbrId = '5'; | |
public string $MerchantID = '085300000009704'; | |
public string $MerchantPass = '12345678'; | |
public string $UserCode = 'QNB_API_KULLANICI_3DPAY'; |
View eslintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": true, | |
"ignorePatterns": [ | |
"projects/**/*" | |
], | |
"overrides": [ | |
{ | |
"files": [ | |
"*.ts" | |
], |
View gist:885a8b66894867e29c021b8c42b3e1fb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const temp = this.employees.filter(employee => { | |
return this.departments.find(department => department.id == employee.departmentId) | |
}).reduce((mem: any, cur: any) => { | |
mem[cur.departmentId] = (mem[cur.departmentId] || 0) + 1; | |
console.log(mem); | |
return mem; | |
}, {}); | |
const calculate = Object.keys(temp).map(key => ({ | |
departmentId: key, |
View ShoppingCartController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Models\FreightRate; | |
use App\Models\ShoppingCart; | |
use App\Models\ShoppingSession; | |
use Illuminate\Http\JsonResponse; | |
use Illuminate\Http\RedirectResponse; | |
use Illuminate\Http\Request; |
NewerOlder