A Pen by Ilya Pestov on CodePen.
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 { useCallback, useEffect, useRef, useState } from "react"; | |
interface UseUndoHook<T> { | |
value: T; | |
onChange: (newValue: T) => void; | |
undo: () => void; | |
redo: () => void; | |
clear: () => void; | |
canUndo: boolean; | |
canRedo: boolean; |
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 { ethers } from "ethers"; | |
import { RuntimeError } from "../errors"; | |
interface NetworkConfig { | |
chainId: string; | |
rpcUrls: string[]; | |
chainName: string; | |
nativeCurrency: { | |
name: string; | |
symbol: string; |
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
#!/usr/bin/env php | |
<?php | |
/** | |
* @author Ferdi ÜNAL | |
* @email ferdi@unal.pw | |
*/ | |
$location = require "location.php"; | |
$json = fopen('location.json', 'w'); |
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
@charset "UTF-8"; | |
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
@layer base { | |
:root { | |
--header-height: 72px; | |
} |
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
[ | |
{ | |
"il": "Adana", | |
"plaka": 1, | |
"ilceleri": [ | |
"Aladağ", | |
"Ceyhan", | |
"Çukurova", | |
"Feke", | |
"İmamoğlu", |
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
func (u *UserHandlers) CreateUser(c *fiber.Ctx) error { | |
errors := ValidateErrorResponse{} | |
errors.Errors = make(library.ValidateError) | |
user := models.User{} | |
v := validator.New() | |
body := new(CreateUserBody) | |
if err := c.BodyParser(body); err != nil { | |
return c.Status(422).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
<?php | |
/** | |
* This method logically validates Turkish VAT number | |
* | |
* @param string $taxNumber | |
* @return bool | |
*/ | |
public function validateTaxNumber(string $taxNumber): bool | |
{ |
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
//Filename: upload.component.ts | |
import { Component, OnInit } from '@angular/core'; | |
import { UploadService } from '../upload.service'; | |
import { map, expand } from 'rxjs/operators'; | |
import { EMPTY } from 'rxjs'; | |
export class uploadFiles { | |
constructor(public video: File, public path: string, public uploadURI: string) { | |
this.video = video; | |
this.path = path; |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"baseUrl": "src", | |
"paths": { | |
"~/*": [ | |
"*" | |
] | |
}, | |
"allowJs": true, | |
"allowSyntheticDefaultImports": true, |
NewerOlder