Skip to content

Instantly share code, notes, and snippets.

Avatar

Niklas Keller kelunik

View GitHub Profile
@kelunik
kelunik / HashFunction.ts
Created Oct 6, 2020 — forked from halfnibble/HashFunction.ts
Hash function to debug absolute paths sent to the update chunk hash method in webpack.
View HashFunction.ts
import * as crypto from 'crypto';
import * as fs from 'fs';
import * as path from 'path';
/**
* Interface for Webpack's hashFunction
*/
export interface IHashFunction {
update: (data: string | Buffer, encoding: string) => IHashFunction;
digest: (encoding: string) => string | Buffer;
View mysql.php
<?php
use Amp\Loop;
use Amp\Mysql\ConnectionConfig;
use Amp\Mysql\Pool;
use Amp\Mysql\ResultSet;
use Amp\Mysql\TimeoutConnector;
use Amp\Socket\ClientTlsContext;
use Illuminate\Support\Collection;