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 { readdir } from 'fs/promises'; | |
import path from 'path'; | |
import im from 'imagemagick'; | |
import { promisify } from 'util'; | |
const PHOTOS_PATH = path.join(process.cwd(), '/public/assets/photos/'); | |
const MAX_WIDTH = 1920; | |
const identifyWidth = promisify( | |
(filePath: string, callback: (err: any, result: string) => void) => { |
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 TYPO3\CMS\Core\Context\Context; | |
use TYPO3\CMS\Core\Utility\GeneralUtility; | |
// ... | |
$context = GeneralUtility::makeInstance(Context::class); | |
/** @var TYPO3\CMS\Core\Site\Entity\Site */ |
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
// This file was initially generated by Windows Terminal 1.11.2921.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
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
composer create-project vendor/package test-install \ | |
--repository "{ \"type\": \"git\", \"url\": \"path\/to\/.git\" }" \ | |
--stability dev |
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
# postgresql | |
sudo apt install postgresql-11 | |
sudo apt install postgresql-server-dev-11 | |
# dependencies | |
sudo apt install libxml2-dev | |
sudo apt install libgeos-dev | |
sudo apt install libproj-dev | |
sudo apt install libgdal-dev |
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
*, *::after, *::before { | |
outline: 1px solid red; | |
} |
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 gulp = require('gulp') | |
const puppeteer = require('puppeteer') | |
const err = (err) => console.log(err) | |
gulp.task('puppeteer', async (done) => { | |
const browser = await puppeteer.launch() | |
const page = await browser.newPage() | |
await page.goto('http://localhost/puppeteer/build/') | |
.then( async (response) => { |
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 | |
function hexToHsl($hex) { | |
$hex = array($hex[0].$hex[1], $hex[2].$hex[3], $hex[4].$hex[5]); | |
$rgb = array_map(function($part) { | |
return hexdec($part) / 255; | |
}, $hex); | |
$max = max($rgb); | |
$min = min($rgb); |