カテゴリー: PHP環境設定

asterisk 保留音を変換する

#!/bin/sh

INDIR=/music/original
OTDIR=/music/asterisk
find ${INDIR}/ -name “*.wav” | grep ” ” | sed -e ‘s/.*/”&”/; p; s/ /_/g’ | xargs -n2 mv
if [ ! -e ${INDIR} ]; then
echo “${INDIR}$1: 元のフォルダーが存在しません.”
return 0
fi
if [ ! -d ${INDIR} ]; then
echo “$1: 元のファイルがフォルダーではありません.”
return 0
fi
if [ ! -e ${OTDIR} ]; then
echo “${OTDIR}$1: 先のフォルダーが存在しません.”
return 0
fi
if [ ! -d ${OTDIR} ]; then
echo “$1: 先のファイルがフォルダーではありません.”
return 0
fi
for file in `ls -1A ${INDIR}/*.wav `
do
fname=`basename ${file}`
echo ${fname}
sox “${INDIR}/${fname}” -b 16 “${OTDIR}/${fname}” channels 1 rate 8k norm gain -24
done

let’s encrypt IIS 更新処理

管理者でコマンドプロンプトを出す

d:
cd D:\win-acme.v2.1.8.847.x64.pluggable
wacs.exe を起動する。
Rを入れてエンターする
Qを入れてエンターする
以上終了

一発コマンド
D:\wacs.exe –renew –baseuri “https://acme-v02.api.letsencrypt.org/”

PostgreSql フィールド情報取得

select
information_schema.columns.column_name as fieldname ,
information_schema.columns.data_type as fieldtype ,
information_schema.columns.character_maximum_length as length ,
information_schema.columns.is_nullable ,
information_schema.columns.column_default as defaultflg,
information_schema.columns.numeric_precision,
information_schema.columns.numeric_precision_radix,
information_schema.columns.numeric_scale,
(select description from pg_description where
pg_description.objoid=pg_stat_user_tables.relid and
pg_description.objsubid=information_schema.columns.ordinal_position
) as comment
from
pg_stat_user_tables,
information_schema.columns
where
pg_stat_user_tables.relname=’authority_mail’
and pg_stat_user_tables.relname=information_schema.columns.table_name
order by information_schema.columns.ordinal_position;

defaultflg
defaultvalue
comment

はいずこ

全自動マージャン卓
10万円未満で買える
折りたたんで収納


会社に1台

AMAZON