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
package main | |
import ( | |
"expvar" | |
"fmt" | |
"net" | |
"net/http" | |
"net/http/httptest" | |
"sync" | |
"testing" |
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
package main | |
import ( | |
"context" | |
"expvar" // Register the expvar handlers | |
"fmt" | |
"log" | |
"net/http" | |
_ "net/http/pprof" // Register the pprof handlers | |
"os" |
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
package main | |
import ( | |
"crypto/subtle" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
var ( |
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
package main | |
import ( | |
"bytes" | |
"errors" | |
"fmt" | |
"runtime" | |
) | |
type AppError struct { |
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
// https://rafallorenz.com/go/go-http-stream-download/ | |
package main | |
import ( | |
"errors" | |
"io" | |
"io/ioutil" | |
"net/http" | |
"time" | |
) |
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 array_map_keys(callable $callback, array $array) { | |
return array_merge([], ...array_map( | |
function ($key, $value) use ($callback) { return [$callback($key) => $value]; }, | |
array_keys($array), | |
$array | |
)); | |
} |
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
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS `displayNullColumns`$$ | |
CREATE PROCEDURE `displayNullColumns`() | |
BEGIN | |
SET @expression = ( | |
SELECT GROUP_CONCAT(CONCAT('SELECT ', s._column, ' AS _value, \'', s._column, '\' AS _column, \'', s._table, '\' AS _table FROM ', s._table, ' WHERE ', s._column, ' = \'null\'') | |
SEPARATOR ' UNION ') | |
FROM ( | |
SELECT DISTINCT | |
COLUMN_NAME AS `_column`, |
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
/** | |
* (c) Rafał Lorenz <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ | |
'use strict'; | |
//Location in the `filters` directory | |
//This way `Loader class will find it. |