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 UseBroadcastChannelOptions { | |
name: string; | |
onMessage?: (event: MessageEvent) => void; | |
onMessageError?: (event: MessageEvent) => void; | |
} | |
interface UseBroadcastChannelReturn<D, P> { | |
isSupported: 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
[ | |
{ | |
"flag": "https://twemoji.maxcdn.com/2/svg/1f1e6-1f1e8.svg", | |
"country": "Ascension Island", | |
"code": "ac" | |
}, | |
{ | |
"flag": "https://twemoji.maxcdn.com/2/svg/1f1e6-1f1e9.svg", | |
"country": "Andorra", | |
"code": "ad" |
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 { src, dest, watch, series, task } = require('gulp'); | |
const postcss = require('gulp-postcss'); | |
const autoprefixer = require('autoprefixer'); | |
const cssnext = require('cssnext'); | |
const precss = require('precss'); | |
const cssnano = require('cssnano'); | |
const sass = require('gulp-sass'); | |
const fontMagician = require('postcss-font-magician'); | |
const rtlcss = require('rtlcss'); | |
const rename = require('gulp-rename'); |
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 | |
use Slim\Http\Request; | |
use Slim\Http\Response; | |
use Slim\Http\Stream; | |
$app->get('/stream', function (Request $request, Response $response, array $args) { | |
// a 100mb file | |
$path = '../public/files/document.pdf'; |
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
redis_cache: redis-server config/redis_cache.conf | |
redis_socketio: redis-server config/redis_socketio.conf | |
redis_queue: redis-server config/redis_queue.conf | |
web: bench serve --port 8000 | |
socketio: /usr/bin/node apps/frappe/socketio.js | |
custom_app: /usr/bin/node apps/custom_app/custom_node.js | |
watch: bench watch | |
schedule: bench schedule | |
worker_short: bench worker --queue short |
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
public function run() { | |
DB::unprepared(File::get('path/to/SQL/file')); | |
} |
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
array ( | |
'ALL' => 'Albania Lek', | |
'AFN' => 'Afghanistan Afghani', | |
'ARS' => 'Argentina Peso', | |
'AWG' => 'Aruba Guilder', | |
'AUD' => 'Australia Dollar', | |
'AZN' => 'Azerbaijan New Manat', | |
'BSD' => 'Bahamas Dollar', | |
'BBD' => 'Barbados Dollar', | |
'BDT' => 'Bangladeshi taka', |