Skip to content

Instantly share code, notes, and snippets.

View zixing8284's full-sized avatar
🚧
いつもの工事中

sasasa10 zixing8284

🚧
いつもの工事中
  • Beijing, China
  • 08:56 (UTC +08:00)
View GitHub Profile
@zixing8284
zixing8284 / restart_nginx.bat
Created August 24, 2022 10:54 — forked from keberwein/restart_nginx.bat
Restart Nginx Windows
@ECHO OFF
cd /nginx
taskkill /f /IM nginx.exe
start nginx
EXIT
## NHKのネット配信サービスであるらじる★らじる。
# 従来は https://gist.github.com/riocampos/5656450 のように rtmpdump を使う必要がありましたが、
# 2017年9月から m3u8 による配信へ変更になったようです。m3u8 なので10秒単位での録音になります。
# また 2021年4月に更新され、以前の M3U8URL は2022年2月末で廃止されました。
## 録音コマンド(m4a)
ffmpeg -i M3U8URL -c copy outputfilename.m4a
# ファイルサイズ的に m4a が最も小さくなる
# m4a ファイルのときだけ "-c copy" オプションが使える。

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@zixing8284
zixing8284 / 1-file_get_contents.php
Created December 19, 2021 14:53 — forked from daveh/1-file_get_contents.php
How to call APIs from PHP: file_get_contents, cURL, Guzzle and SDKs (code to accompany https://youtu.be/wMyP-q3nPd4)
<?php
$payload = json_encode([
"title" => "Updated title"
]);
$options = [
"http" => [
"method" => "PATCH",
"header" => "Content-type: application/json; charset=UTF-8\r\n" .