Skip to content

Instantly share code, notes, and snippets.

View lepig's full-sized avatar
🎯
Focusing

Geek Cho lepig

🎯
Focusing
  • Global
View GitHub Profile
@lepig
lepig / merge_mijia.py
Created May 11, 2021 00:50 — forked from secsilm/merge_mijia.py
合并米家摄像头监控视频,生成以天为单位的视频文件。
import subprocess
from pathlib import Path
from loguru import logger
def merge_vids(vidlist_file: str, tofile: str):
"""执行 ffmpeg 命令合并视频。"""
cmd = f"ffmpeg -f concat -safe 0 -i {vidlist_file} -c:v copy -c:a flac -strict -2 {tofile}"
subprocess.run(cmd)
@lepig
lepig / _ide_helper.php
Created June 21, 2018 01:48 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@lepig
lepig / get-yii2-ar-raw-sql.php
Created May 18, 2018 05:36 — forked from dcb9/get-yii2-ar-raw-sql.php
如何获取 YII2 AR 执行的 SQL 语句,直接用程序输出,而不是通过日志去查看
<?php
$query = User::find()
->where(['id'=>[1,2,3,4])
->select(['username'])
// get the AR raw sql in YII2
$commandQuery = clone $query;
echo $commandQuery->createCommand()->getRawSql();