Skip to content

Instantly share code, notes, and snippets.

@bewho
bewho / functions.php
Created February 7, 2018 11:31
M11 functions
<?php
/*
Plugin Name: M11 Theme Features
Plugin URI: https://speedword.press
Description: Das Plugin muss sich im Ordner wp-content/mu-plugins/ befinden. Ebenfalls muss in der wp-config autoupdaten aktiviert sein.
Author: Daniel Bieli
Author URI: https://speedword.press
License: GPL2
*/
<?php
/*
Plugin Name: Disable Full Size Image
Description: This plugin removes the "Original Size" option in the drop down when inserting an image into a post
Version: 0.1
Author: Bernhard Kau
Author URI: http://kau-boys.de
*/
function disable_full_size_image( $image_size_names ) {
{"sig":"b4ee7efdf18f40157f2e189d04ad4f1d895633e4b9036d7bb276a69c6cc20cabc33ce4999e4116d9ec4308c0063393bcc6afdf62d917f010f7ebfd2b0d8d76551","msghash":"5bc5382e956142a65949eed71f806d1d0fad1167d3f68e4cdf2d0aa1a8af19cb"}
<?php
/**
* Implement the Custom Header feature.
*/
require get_parent_theme_file_path( '/inc/custom-header.php' );
/**
* Custom template tags for this theme.
*/
@bewho
bewho / custom.css
Created February 22, 2018 07:43
fade-in
@keyframes fade-in {
0% {opacity: 0;}/*初始状态 透明度为0*/
40% {opacity: 0;}/*过渡状态 透明度为0*/
100% {opacity: 1;}/*结束状态 透明度为1*/
}
@-webkit-keyframes fade-in {/*针对webkit内核*/
0% {opacity: 0;}
40% {opacity: 0;}
100% {opacity: 1;}
upstream redis {
server 127.0.0.1:6379;
keepalive 512;
}
server {
listen 80;
server_name www.mf8.biz mf8.biz;
access_log off;
index index.html index.htm index.php;
@bewho
bewho / php-fpm.conf
Created February 24, 2018 02:45 — forked from ivmm/php-fpm.conf
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;
[global]
pid = run/php-fpm.pid
@bewho
bewho / sysctl.conf
Created February 28, 2018 12:31
内核优化
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
{"sig":"14d84fdbd7b480a147ea98011619171ada3cb6768c6c4ce83d025d3b9228bfc0a3b83e1640b75de288848de3037696e50f1377e3197d216418b88d20c7b4806f1","msghash":"68396b16b03ba84aac516a034c05088da90147704b14ba1f67b59068c47e3785"}
@bewho
bewho / sysctl.conf
Created March 17, 2018 08:58
自用优化的 sysctl.conf 配置 @2018.03.17
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).