Skip to content

Instantly share code, notes, and snippets.

@inkss
inkss / _readme.md
Last active April 20, 2025 07:20
uBlacklist 中文搜索屏蔽名单

简介

uBlacklist 可以对搜索引擎的结果进行过滤,屏蔽不喜欢/需要的搜索结果,支持常见的如谷歌/必应搜索。

下载链接

扩展地址:ublacklist

订阅链接

@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',
@mcaskill
mcaskill / Function.Get-Var-Type.php
Last active April 13, 2020 13:07
PHP : Get the type, resource name, or class name of a variable.
<?php
if (!function_exists('get_var_type')) {
/**
* Get the type, resource name, or class name of a variable.
*
* Returns the type (name if an object or resource) of the PHP variable $var.
*
* @link http://php.net/manual/en/function.gettype.php#104224
* @param mixed $var The variable being type checked.
@mcaskill
mcaskill / Function.Is-Var-Empty.php
Last active April 13, 2020 13:10
PHP : Determine whether a variable or object is empty.
<?php
if (!function_exists('is_var_empty')) {
/**
* Determine whether a variable is empty.
*
* Alternative to {@see empty()} which will resolve stringable and arrayable objects.
*
* @param mixed $var The value to be checked.
* @return boolean Returns FALSE if var exists and has a non-empty value. Otherwise returns TRUE.
@mcaskill
mcaskill / Function.Strip-HTML.php
Last active January 4, 2022 10:38
PHP : Strip HTML and PHP tags from a string.
<?php
if (!function_exists('strip_html')) {
/**
* Strip HTML and PHP tags from a string.
*
* @param string $str The input string.
* @return string Returns the stripped string.
*/
function strip_html($str)
@mcaskill
mcaskill / Function.Array-Group-By.php
Last active April 22, 2025 10:45
PHP : Groups an array by a given key
<?php
if (!function_exists('array_group_by')) {
/**
* Groups an array by a given key.
*
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
*
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
* This variant allows $key to be closures.
@mcaskill
mcaskill / Function.Array-Insert.php
Last active April 13, 2020 13:11
PHP : Insert elements from a passed array into the first array
<?php
if (!function_exists('array_insert')) {
/**
* Insert an array into another array before/after a certain key
*
* Merge the elements of the $array array after, or before, the designated $key from the $input array.
* It returns the resulting array.
*
* @param array $input The input array.
@mba811
mba811 / Git Ignore.md
Last active July 4, 2022 06:24
Git Ignore 仓库忽略以下内容所提及的文件 文件 ~/.gitignore
# Folder view configuration files
.DS_Store
Desktop.ini

# Thumbnail cache files
._*
Thumbs.db

# Files that might appear on external disks