This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "测试电台", | |
"musics": [ | |
{ | |
"name": "测试电台1", | |
"url": "http://ngcdn001.cnr.cn/live/zgzs/index.m3u8", | |
"type": "radio" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define LUA_LIB | |
#include <lua.h> | |
#include <lauxlib.h> | |
#include <string.h> | |
static void | |
dump_stack(lua_State *L, const char * name) { | |
int top = lua_gettop(L); | |
for (int i=1; i<=top; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hanzi-writer.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> | |
<style> | |
.box { | |
border: 1px solid rgb(235, 235, 235); | |
width: 60px; | |
margin-right: 5px; | |
margin-top: 15px; | |
display: inline-flex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -std=c99 -g philosopher.c -o philosopher | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
struct philosopher { | |
int id; | |
int think_count; | |
bool eating; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fork from https://github.com/xjdrew/lua-zset | |
// skiplist similar with the version in redis | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
#include "skiplist.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# filename: /root/chk_net_redail.sh | |
# 4=network error/refused/timeout/dns err/ | |
# need "opkg install wget ca-bundle" | |
log() | |
{ | |
#echo $* | |
logger -t redail $* | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 获得拖拽文件的回调函数 | |
function getDropFileCallBack (dropFiles) { | |
//console.log(dropFiles, dropFiles.length) | |
upload_parse(dropFiles) | |
} | |
var dropZone = document.querySelector("#dropZone") | |
dropZone.addEventListener("dragenter", function (e) { | |
e.preventDefault() | |
e.stopPropagation() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically generated file; DO NOT EDIT. | |
# OpenWrt Configuration | |
# | |
CONFIG_MODULES=y | |
CONFIG_HAVE_DOT_CONFIG=y | |
# CONFIG_TARGET_sunxi is not set | |
# CONFIG_TARGET_apm821xx is not set | |
# CONFIG_TARGET_ath25 is not set | |
# CONFIG_TARGET_ar71xx is not set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- calculate.lua | |
local skynet = require "skynet" | |
local CMD = {} | |
function CMD.calculate(a, b) | |
return a^b | |
end | |
function CMD.exit() | |
skynet.error("slave exit.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- fork from https://github.com/cloudwu/luareload/blob/3dbd54ddfda5848623e9b93576d16dfe4c6b4169/reload.lua | |
-- changes: | |
-- 1. local a = { xx = 100} -- this will use merge new data | |
-- 2. local a = 100 -- this will use new data | |
-- 3. local a = "abcd" -- this will use new data | |
-- 4. local a = MEMORY_VAR("a", 0) -- this will use old data | |
-- 5. local a = RESET_VAR("a", 0) -- this will use new data | |
local reload = {} | |
local sandbox = {} |
NewerOlder