Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<section>
<div id="message"></div>
@stanleybz
stanleybz / gist:72440c062a0702cb0f85561305deb68f
Created November 7, 2017 09:24
Recursive jpeg compression on Mac
$brew install jpegoptim
$find ./ -name "*.jpg" -exec jpegoptim -m 90 {} \;
@stanleybz
stanleybz / default
Last active April 10, 2018 05:21 — forked from psgganesh/default
Simple lumen nginx conf
server {
# ---- Should be default on your config ----
listen 80;
listen [::]:80;
# ......
# ---- ^^^ should be default set on your config ^^^ ----
@stanleybz
stanleybz / route.js
Created May 9, 2018 05:23
React route auto scroll to top
<Route
onChange={(prevState, nextState) => {
if (nextState.location.action !== 'POP') window.scrollTo(0, 0);
}}
>
<Route/>
05/20/19 14:20:02.522 [218.250.236.27:53080 1 dyj] 💓 ------POST HTTP/1.1 /wp-login.php
05/20/19 14:20:02.522 [218.250.236.27:53080 1 dyj] Query String:
05/20/19 14:20:02.522 [218.250.236.27:53080 1 dyj] HTTP_REFERER: http://ls.rcvc.io/loginpress/
05/20/19 14:20:02.522 [218.250.236.27:53080 1 dyj] User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36
05/20/19 14:20:02.522 [218.250.236.27:53080 1 dyj] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
05/20/19 14:20:02.522 [218.250.236.27:53080 1 dyj] Accept Encoding: gzip, deflate
05/20/19 14:20:02.522 [218.250.236.27:53080 1 dyj] X-LSCACHE: true
05/20/19 14:20:02.649 [218.250.236.27:53080 1 dyj] -------- litespeed-cache.class init run --------
05/20/19 14:20:02.650 [218.250.236.27:53080 1 dyj] Media init
05/20/19 14:20:02.650 [218.250.236.27:53080 1 dyj] ---- Run get_role ----
CREATE TABLE IF NOT EXISTS `xxx_litespeed_optimizer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hash_name` varchar(60) NOT NULL COMMENT "hash.filetype",
`src` text NOT NULL COMMENT "full url array set",
`dateline` int(11) NOT NULL,
`refer` varchar(255) NOT NULL COMMENT "The container page url",
PRIMARY KEY (`id`),
UNIQUE KEY `hash_name` (`hash_name`),
KEY `dateline` (`dateline`)
CREATE TABLE IF NOT EXISTS `xxx_litespeed_optimizer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hash_name` varchar(60) NOT NULL COMMENT "hash.filetype",
`src` text NOT NULL COMMENT "full url array set",
`dateline` int(11) NOT NULL,
`refer` varchar(255) NOT NULL COMMENT "The container page url",
PRIMARY KEY (`id`),
UNIQUE KEY `hash_name` (`hash_name`),
KEY `dateline` (`dateline`)
<?php
/**
* The admin settings handler of the plugin.
*
*
* @since 1.1.0
* @package LiteSpeed_Cache
* @subpackage LiteSpeed_Cache/admin
* @author LiteSpeed Technologies <[email protected]>
*/
const critical = require('critical');
function generateCCSS(inputURL) {
const is_mobile = false;
var ccss_options = {
src: inputURL,
ignore: {
atrule: ['@font-face', '@import'],
},
add_action('litespeed_esi_shortcode-vc_posts_slider', 'enqueue_vc_assets');
add_action('litespeed_esi_shortcode-vc_media_grid', 'enqueue_vc_assets');
function enqueue_vc_assets() {
error_log('enqueue_vc_assets');
if (function_exists('vc_asset_url')) {
wp_register_style( 'flexslider', vc_asset_url( 'lib/bower/flexslider/flexslider.min.css' ), array(), WPB_VC_VERSION );
wp_register_style( 'vc_pageable_owl-carousel-css', vc_asset_url( 'lib/owl-carousel2-dist/assets/owl.min.css' ), array(), WPB_VC_VERSION );
wp_register_style( 'animate-css', vc_asset_url( 'lib/bower/animate-css/animate.min.css' ), array(), WPB_VC_VERSION );
wp_register_style( 'prettyphoto', vc_asset_url( 'lib/prettyphoto/css/prettyPhoto.min.css' ), array(), WPB_VC_VERSION );