Skip to content

Instantly share code, notes, and snippets.

View xx19941215's full-sized avatar
🎯
Focusing

xiaoxiao.ust xx19941215

🎯
Focusing
View GitHub Profile
@xx19941215
xx19941215 / gist:4db6e24c5af4c35966dd9d7137582573
Created October 1, 2021 09:55
0x3EdD6b02346C4Aec137c694aB74c0285981BBd02
0x3EdD6b02346C4Aec137c694aB74c0285981BBd02
{"lastUpload":"2024-03-26T07:54:15.353Z","extensionVersion":"v3.4.3"}
@xx19941215
xx19941215 / 按照指定长度间隔分割字符串.js
Created October 14, 2019 02:39
按照指定长度间隔分割字符串.js
let func = (source, count) => {
let arr = [];
for (let i = 0, len = source.length / count; i < len; i++) {
let subStr = source.substr(0, count);
arr.push(subStr);
source = source.replace(subStr, "");
}
return arr;
}
@xx19941215
xx19941215 / sql
Created June 14, 2019 07:33
mysql预查询例子
PREPARE prod FROM "select count(*) as aggregate from `t_letter_dep` where `id` = ? and (`site_id` = ?)";
set @p = '1; truncate table log_access;';
set @q = '3';
execute prod using @p,@q;
{
"code": 0,
"msg": "请求成功",
"data": {
"page_list": {
"page_size": 25,
"page": 1,
"page_total": 1,
"total": 23
},
{
"code": 0,
"msg": "success",
"data": {
"shopList": [
{
"uid": 0,
"shop_dangkou": "N档",
"ShopIsGold": 0,
"market_name": "王庄",
@xx19941215
xx19941215 / tcpdump.sh
Created October 24, 2018 06:02
tcpdump抓本地回环地址的tcp包
sudo tcpdump -S -i lo0 -nnn tcp port 8888
<?php return
array (
'newsList' =>
array (
'current_page' => 1,
'data' =>
array (
0 =>
array (
<?php return
array (
'hotTags' =>
array (
0 =>
array (
'text' => '电商',
'href' => '/news/tag/%E7%94%B5%E5%95%86',
),
{
"code": 0,
"msg": "success",
"data": {
"total": 450,
"page": 1,
"items": [
{
"id": 201711080711087643,
"sortId": 15,