Skip to content

Instantly share code, notes, and snippets.

@fuyuanli
fuyuanli / IdentTrust.pem
Last active October 15, 2018 16:12
Zimbra快速安裝Let's Encrypt
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
@fuyuanli
fuyuanli / file.js
Created September 4, 2018 15:02
移除FB自動撥放下一則影片_tampermonkey
// ==UserScript==
// @name Remove Facebook UP NEXT Popup
// @description Removes the annoying UP NEXT popup from Facebook videos and cancels the next video play automatically.
// @version 0.1.5.2
// @author Ariel Jannai
// @namespace https://github.com/arieljannai/tampermonkey-scripts
// @supportURL https://github.com/arieljannai/tampermonkey-scripts/issues
// @updateURL https://github.com/arieljannai/tampermonkey-scripts/raw/master/facebook/remove-upnext-popup-cancel-next.user.js
// @downloadURL https://github.com/arieljannai/tampermonkey-scripts/raw/master/facebook/remove-upnext-popup-cancel-next.user.js
// @match https://www.facebook.com/*
# MariaDB 10.3 CentOS repository list - created 2018-09-02 15:45 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
curl https://get.acme.sh | sh
wget -O - https://get.acme.sh | sh
@fuyuanli
fuyuanli / 01.c
Created August 2, 2018 05:41
2018_Digi+_IOT
void setup() {
// put your setup code here, to run once:
pinMode(13,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(13,HIGH);
delay(1000);
digitalWrite(13,LOW);
export CF_Key="1234567abcdefg"
export CF_Email="[email protected]"
DOMAIN="example.com"
.acme.sh/acme.sh --issue -d $DOMAIN -d *.$DOMAIN -w /var/www/html --dns dns_cf \
--cert-file /etc/pki/tls/certs/wildcard.$DOMAIN.crt \
--key-file /etc/pki/tls/private/wildcard.$DOMAIN.key \
--fullchain-file /etc/pki/tls/certs/wildcard.$DOMAIN-chain.crt \
--ca-file /etc/pki/tls/certs/wildcard.$DOMAIN-ca.crt \
cd "%ProgramFiles%\Microsoft Office\Office16"
cscript ospp.vbs /sethst:kms.becoder.org
cscript ospp.vbs /act
@fuyuanli
fuyuanli / Active.Office16.Windows10.vbs
Last active June 20, 2018 03:30
Active KMS on Boot
'--------------
'Start of UAC workaround code
If WScript.Arguments.length =0 Then
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & _
WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1
Else
'--------------
echo $(ifconfig vmbr0 | grep 'inet' | cut -d: -f2 | awk '{print $2}')
// 來源:http://www.chinaz.com/web/2012/0619/258280.shtml
<?php
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'improved_trim_excerpt');
function improved_trim_excerpt($text) {
global $post;
if ( '' == $text ) {
$text = get_the_content('');
$text = apply_filters('the_content', $text);
$text = str_replace('\]\]\>', ']]&gt;', $text);