Skip to content

Instantly share code, notes, and snippets.

View wuliupo's full-sized avatar
🎯
Focusing: Jenkins, Vue, React

Pauli wuliupo

🎯
Focusing: Jenkins, Vue, React
View GitHub Profile
@wuliupo
wuliupo / phpexplorer.php
Last active March 16, 2017 06:02
php explorer
<?php
//************************************************************************//
//* PHP Explorer 0.7 Codename: "mustard" *//
//* Author: Marcelo L. Mottalli <mottalli@sinectis.com.ar> *//
//* Homepage: http://phpexplorer.sourceforge.net/ *//
//************************************************************************//
//////////////////////////////// USEFUL VARIABLES /////////////////////////////
$associations = array(
@wuliupo
wuliupo / meow.htm
Created February 10, 2017 02:05
es6 Generator
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Simple ES6 Generator Example</title>
<style>
body{margin:1em auto;max-width:800px;background-color:white;font-size:28px;font-family:serif;}
blockquote{position:relative;padding:15px 15px;margin:2em 0px 1em;border:10px solid #5A8F00;min-height:4.5em;line-height:4em;text-align:center;color:#333;background:#FFF none repeat scroll 0% 0%;border-radius:20px;}
blockquote::before,blockquote::after{display:block;content:"";position:absolute;z-index:10;bottom:-40px;left:50px;height:30px;border-style:solid;border-width:0px 10px 10px 0px;border-color:#5A8F00;background:transparent none repeat scroll 0% 0%;}
blockquote::before{width:50px;border-bottom-right-radius:80px 50px;}
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@wuliupo
wuliupo / VideoUrlparser.php
Created January 26, 2017 01:52
分析优酷、土豆等视频网站的播放页面,获取视频标题、视频截图、M3U8地址以及插入页面的swf地址
<?php
/**
* VideoUrlparser
*
* @package
* @version 1.4
* @Author https://github.com/jShi-git/VideoUrlparser/blob/master/VideoUrlparser.php
*
* Usage
* require_once "VideoUrlParser.class.php";
@wuliupo
wuliupo / local-www-httpd.conf
Last active January 19, 2017 08:18
ProxyPass dynamic html to Node.js by Apache
# Apache httpd config
# defined: Include conf/extra/local-www-httpd.conf;
# location: conf/extra/local-www-httpd.conf;
<VirtualHost www.test-local.com:80>
DocumentRoot D:/test-local
ServerName www.test-local.com
ServerAlias test-local.com
RewriteEngine on
@wuliupo
wuliupo / update-wordpress-utf8.sql
Created January 18, 2017 11:43
update wordpress database to utf8
ALTER TABLE `wp_commentmeta` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_comments` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_layerslider` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_links` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_options` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_post2tag` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_postmeta` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_posts` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_revslider_css` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
ALTER TABLE `wp_revslider_layer_animations` ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
@wuliupo
wuliupo / ellipsis.htm
Last active November 18, 2016 03:16
CSS ellipsis
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS ellipsis</title>
</head>
<style>
div {
margin: 20px auto;
border: 1px solid #CCC;
@wuliupo
wuliupo / property-extend.js
Created November 11, 2016 09:09
property extended from parent
var parentObj = {a:2};
var sunObj = Object.create( parentObj );
parentObj.a; // 2
sunObj.a; // 2
parentObj.hasOwnProperty( "a" ); // true
sunObj.hasOwnProperty( "a" ); // false
sunObj.a++; // block mode
parentObj.a; // 2
sunObj.a; // 3
sunObj.hasOwnProperty("a"); // true ???
@wuliupo
wuliupo / closure-var.js
Created November 9, 2016 07:30
let-var
for(var i = 1; i <= 5; i++){
setTimeout(function(){
console.log(i);
}, 10);
}
// 5, 5, 5, 5, 5
for(let i = 1; i <= 5; i++){
setTimeout(function(){
@wuliupo
wuliupo / module-define.js
Created November 9, 2016 07:29
JavaScript modern module definition
var MyModules = (function() {
var modules = {};
return {
defineModule(name, deps, impl) {
for (var i = 0; i < deps.length; i++) {
deps[i] = modules[deps[i]];
}
modules[name] = impl.apply(impl, deps);
}, getModule(name) {
return modules[name];