Skip to content

Instantly share code, notes, and snippets.

View PrintNow's full-sized avatar

Shine PrintNow

View GitHub Profile
@t3dotgg
t3dotgg / try-catch.ts
Last active May 9, 2025 13:49
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@inkss
inkss / #readme.md
Last active April 30, 2025 09:36
IPV6 直播源

个人向直播源

精简了上游直播源内容,仅保留个人所需的。

一、订阅地址

TVM3U

https://gist.githubusercontent.com/inkss/0cf33e9f52fbb1f91bc5eb0144e504cf/raw/ipv6.m3u
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active March 29, 2025 12:18
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@zwjzxh520
zwjzxh520 / NginxLog.php
Last active February 1, 2022 13:59
php写的nginx 日志分析
<?php
/**
* nginx日志文件分析。
* 根据配置的nginx日志格式,分析对应的日志内容。各变量
*/
class NginxLog {
protected static $br = "\n";
/**
@Yimiprod
Yimiprod / difference.js
Last active May 4, 2025 11:59
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {