Skip to content

Instantly share code, notes, and snippets.

@kiebekierror
kiebekierror / metadata.js
Created July 14, 2024 02:07
get metadata for "Create a custom static MP3 Stream URL with admin to update URL"
const fs = require("fs");
const path = require("path");
function readMetadata(audioFilePath) {
fs.open(audioFilePath, "r", function (err, fd) {
if (err) {
console.error("Error opening file:", err);
return;
}
@kiebekierror
kiebekierror / README.md
Created December 4, 2023 08:56 — forked from Softwave/README.md
Fibonacci Program

Fib

Simple fibonacci number calculator.

Usage: fib nth Fibonacci number

netsh int ipv4 show excludedportrange protocol=tcp

查看 git 日志

git log --author="NovusLio" --pretty=tformat: --numstat --since=1.day.ago | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -
@kiebekierror
kiebekierror / migration 的操作.md
Created March 22, 2019 03:44
lumen 数据库迁移工具

migration 的操作

创建 migration

php artisan make:migration [自定义名称]

PHP代码

<?php
/* LIKE 查询系统配置变量 */
SHOW VARIABLES LIKE '%Trans%';
/* LIKE 查询系统状态 */
SHOW STATUS LIKE '%变量名% ';
@kiebekierror
kiebekierror / 清理磁盘文件.md
Last active January 29, 2019 07:55
Linux 服务器运维 [汇总]

清理磁盘文件

1. 找出占用空间大的文件

命令格式 :

du -h[输出人类可读的格式] [指定目录] --max-depth=[指定搜索文件层级深度]

命令示例 :

@kiebekierror
kiebekierror / 前端 JavaScript location 变量研究
Created December 10, 2018 10:11
前端 JavaScript location 变量研究
var IndexRedirect = {
getUrlVars : function ()
{
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,
function (m,key,value)
{
vars[key] = value;
});
return vars;
@kiebekierror
kiebekierror / linux crontab
Last active January 18, 2019 06:12
Linux find 命令 查找包含指定内容的文件.
crontab -e
* * * * * /usr/bin/curl '$url' >/dev/null 2>&1;