- yos.bat
- yos.sh
- dockerfile
- apache conf
- nginx conf
- package.json
- jmeter bat
- Java & postgreSQL DEV ENV
- vscode_settings.json
- code
- Frontend Pagination
- php _http_post
- bash
- subtitles
- Create multiple files from template && php run files
- /etc/ssh/sshd_config
- chat system table
- remote-browser configuration | vscode
-
-
Save Phalacrocorax/557ecb4e70152b3dbec969d6060a0770 to your computer and use it in GitHub Desktop.
| { | |
| "extends": ["google"], | |
| "env": { | |
| "browser": true, | |
| "es6": true | |
| }, | |
| "plugins": [], | |
| "parserOptions": {}, | |
| "globals": {}, | |
| "rules": { | |
| "one-var": "off", | |
| "quotes": "off", | |
| "prefer-const": "off", | |
| "comma-dangle": "off" | |
| } | |
| } |
| " --- configure syntax highlighting --- " | |
| " possible cterm colors: | |
| " black, blue, cyan, gray, green, magenta, red, white, yellow | |
| color molokai | |
| " enable syntax highlighting | |
| syntax on | |
| " show the editing mode on the last line | |
| set showmode | |
| " highlight matching search strings | |
| set hlsearch | |
| " make searches case insensitive | |
| " set ignorecase | |
| set tabstop=4 | |
| " set autoindent |
#!/bin/bash
# echoの装飾用
# - Usage (30~37) Black Red Green Yellow Blue Magenta Cyan White
ESC="\e["
ESCEND=m
COLOR_OFF=${ESC}${ESCEND}
# Description
echo -en "${ESC}36${ESCEND}"
echo "*********FUNCTION LIST************"
echo "- USAGE (.\\_func.sh && <function>)"
echo "createImport: create import_<>.php"
echo "runImport: except [course] & [user upload]"
echo "**********************************"
echo -en "${COLOR_OFF}"
createImport () {
declare -a key=("coach" "join_course" "lesson" "join_lesson" "area" "block" "group" "club" "school_structure" "user_role")
declare -a file=("coach" "join_course" "lesson" "join_lesson" "area" "block" "group" "club" "schoolstructure" "userrole")
i=0
template='.\_template.php'
for e in ${file[@]}; do
csv="exp_${e}.csv"
cp -f ${template} ".\import_${e}.php"
sed -i -e "s/{{object_key}}/${key[$i]}/g; s/{{csv}}/${csv}/g" ".\import_${e}.php"
let i++
done
}
runImport(){
for f in import_*.php; do
echo -en "${ESC}33${ESCEND}"
echo "Executing: $f"
php $f
echo -en "${COLOR_OFF}"
done
}@echo off
set PATH_ORG=%PATH%
set PATH=C:\_dev\apache-jmeter-5.0\apache-jmeter-5.0\bin;%PATH%
setlocal enabledelayedexpansion
set login_password=%1
if "%login_password%" == "" (
echo "パスワードを指定して下さい"
exit /b 1
)
set jmeter_server=%2
if "%jmeter_server%" == "" (set jmeter_server=localhost)
set jmeter_thread1=%3
if "%jmeter_thread1%" == "" (set jmeter_thread1=10)
REM 設定ファイルパス
set CONFFILE=.\efpai_system_test.ini
REM 設定ファイルが存在するか確認する
if not exist %CONFFILE% (
echo ERROR: Not found %CONFFILE%
exit /b 1
)
REM 設定ファイルを読み込む
for /f "usebackq tokens=1,* delims==" %%a in ("%CONFFILE%") do (
set %%a=%%b
)
set F-723-02_maxLoop
set jmeter_proxyHost
set jmeter_proxyPort
set jmeter_serverPort
set jmeter_protocol
if "%jmeter_proxyHost%" == "" (
set jmeter_proxy_opt=
) else (
set jmeter_proxy_opt=-H %jmeter_proxyHost% -P %jmeter_proxyPort%
)
set jmeter_test_all_opt=-JloginPassword=%login_password% -JserverHost=%jmeter_server% -Jgroup1.thread=%jmeter_thread1% -JserverPort=%jmeter_serverPort% -Jprotocol=%jmeter_protocol%
rem Delete User & Import Data
rem call jmeter -n -t efapi_delete_data.jmx %jmeter_proxy_opt% %jmeter_test_all_opt% -JmaxLoop=%delete_data_maxLoop% -j efapi_delete_data_start.log
rem call jmeter -n -t efapi_delete_user.jmx %jmeter_proxy_opt% %jmeter_test_all_opt% -JmaxLoop=%delete_user_maxLoop% -j efapi_delete_user_start.log
rem Create User & Import Data
rem call jmeter -n -t efapi_create_user.jmx %jmeter_proxy_opt% %jmeter_test_all_opt% -JmaxLoop=%create_user_maxLoop% -j efapi_create_user.log
rem call jmeter -n -t efapi_import_data.jmx %jmeter_proxy_opt% %jmeter_test_all_opt% -JmaxLoop=%import_data_maxLoop% -j efapi_import_data.log
rem API System Test
set List[0]=F-723-02
set List[1]=F-723-03
set List[2]=F-723-04
set List[3]=F-723-05
set List[4]=F-723-06
set List[5]=F-723-07
set List[6]=F-723-08
set List[7]=F-723-09
set List[8]=F-723-10
set List[9]=F-723-11
set List[10]=F-723-12
for /l %%I in (0,1,5) do (
rem filename & log & csv
call set name=efpai_system_test_%%List[%%I]%%
rem maxLoop
call set maxLoop_tmp=%%List[%%I]%%_maxLoop
call set maxLoop=%%!maxLoop_tmp!%%
rem execute
call jmeter -n -t !name!.jmx %jmeter_proxy_opt% %jmeter_test_all_opt% -JmaxLoop=!maxLoop! -j !name!.log -l !name!.csv
)
rem Delete User & Import Data
rem call jmeter -n -t efapi_delete_data.jmx %jmeter_proxy_opt% %jmeter_test_all_opt% -JmaxLoop=%delete_data_maxLoop% -j efapi_delete_data_end.log
rem call jmeter -n -t efapi_delete_user.jmx %jmeter_proxy_opt% %jmeter_test_all_opt% -JmaxLoop=%delete_user_maxLoop% -j efapi_delete_user_end.log
endlocal
set PATH=%PATH_ORG%
exit /b 0
@echo on
4) read -r -p 'Please enter the rawname: ' rawname
38 read -p "First burn in?(y/n): " first #read file from other files
39 echo "start burn $rawname"
40 cd ~/Movies/_マジモテ/_workplace/
41 fix="_fi"
42 if [ $first = "y" ];then
43 ffmpeg -i "$rawname.mp4" -vf "ass=$rawname.ass" "$rawname$fix.mp4"
44 mv "$rawname.mp4" ../_raw/
45 mv "$rawname.ass" ../_ass/
46 else
47 ffmpeg -i "../_raw/$rawname.mp4" -vf "ass=../_ass/$rawname.ass" "$rawname$fix.mp4"
48 fi
49 read -p "Open output folder & write log?(y/n): " ifopen
50 if [$ifopen = "y"];then
51 open .
52 echo "`date` $rawname \n" >> MJMT_work.log #write log file
53 else
54 echo end
55 fi
56 ;;My YT DL bash script It outputs ids to a file so it doesn't try to rip them again next time it runs, It logs all to a log file with date and time stamps. It outputs thumb and description.
#!/bin/sh
YTUSR=youtubechannelnamehere
LOG=output.log
echo "****** $(date -R) ******" >> $LOG
echo "****** $(uptime) ******" >> $LOG
youtube-dl --download-archive "filelist.txt" -ciw --no-progress --write-thumbnail --write-description -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4/best ytuser:$YTUSR -o "%(upload_date)s.%(title)s.%(ext)s" --restrict-filenames >> $LOG
echo "****** $(date -R) ******" >> $LOG
echo "****** $(uptime) ******" >> $LOG| { | |
| "window.zoomLevel": 0, | |
| "workbench.iconTheme":"material-icon-theme", | |
| "workbench.colorTheme":"Monokai", | |
| "editor.fontSize":15, | |
| "editor.fontFamily":"Menlo", | |
| "material-icon-theme.showUpdateMessage":false, | |
| "extensions.ignoreRecommendations":true, | |
| "editor.multiCursorModifier": "ctrlCmd", | |
| // markdown | |
| "markdownlint.config": { | |
| "default": true, | |
| "MD047": false, | |
| "MD032": false, // blank line around list | |
| "MD034": false, // no bare links | |
| "MD039": false, // space inside links | |
| }, | |
| // php | |
| "phpfmt.psr2": true, | |
| "[php]": { | |
| "editor.formatOnSave":true, | |
| "editor.renderLineHighlight":"all", // 選択行を行番号含めすべてハイライト | |
| "editor.tabSize":4, // タブのサイズ変更 | |
| }, | |
| // python | |
| "python.linting.pylintArgs": [ | |
| "--disable","W0621,C0111,C0103", | |
| "--indent-string=\" \"", | |
| "--extension-pkg-whitelist", "numpy", | |
| "--generated-members","torch.*", | |
| "--indent-string=\" \"" | |
| ], | |
| // sftp | |
| "remoteBrowser.connectionOptions": { | |
| "host": "xxx.xxx.xx.xxxx", // MANDATORY | |
| "username": "hadoop", // MANDATORY | |
| "localHostname": "localhost", | |
| "privateKey": "C:/Users/xxxx/poct-anx-emr-keypair.pem", | |
| "localUsername": "localhost", // Identify as myuser@myhost | |
| "defaultPath": "/home/hadoop" // Default directory to start in on connect (Absolute path) | |
| }, | |
| "remoteBrowser.additionalConnections": [{ | |
| "host": "xxx.xxx.xx.xx", | |
| "username": "root", | |
| "defaultPath": "/var/www/" | |
| }] | |
| } | |
| } |
@echo off
: コメント
: cd C:\_dev\ef\git\earthfinder_postgresql\efdev
doskey ls=dir /w
doskey op=explorer
doskey ~=cd %HOMEPATH%
doskey cat=type $*
doskey ll=dir /ad
echo path 1: api_base
echo path 2: jmeter Overall_test
echo path 3: psc Rakuza upload csv
set USR_INPUT_STR=
set /P STR_INPUT="GOTO:"
IF "%STR_INPUT%" == "1" (
cd C:\_dev\ef\ef-env\api_base
)
IF "%STR_INPUT%" == "2" (
cd C:\_dev\apache-jmeter-5.0\_Overall_test
)
IF "%STR_INPUT%" == "3" (
cd C:\_dev\psc\src\ImportFile\Guzzle
) alias open=explorer
alias bashrc='vim ~/.bashrc'
alias tree='pwd;find . -path ./node_modules -prune -o -print | sort | sed '\''1d;s/^\.//;s/\/\([^/]*\)$/|--\1/;s/\/[^/|]*/| /g'\'''
# cd directory
function d(){
echo "Select the action
1) cd anyapp
2) cd DCA_Scrapy
x) exit
"
read n
case $n in
1) cd /c/Users/_dev/anyapp;;
2) cd /c/Users/DCA_Scrapy;;
3) cd /c/_dev/psc/src/psc-school-rakuza/rakuza;;
*) echo "exit";;
esac
}
# ✖ cd windows path
# ✔ use cd "" ※quotation marks
function cdwin(){
line=$(sed -e 's#^J:##' -e 's#\\#/#g' <<< "$1")
cd "$line"
}
# dictionary
function dict(){
curl "dict.org/d:$1"
}echo " -------------------
1) Backup DB
"
read n
case $n in
1) read -p "Please input dbname: " dbnm
dt=$(date +%Y%m%d)
echo "start"
mysqldump -uroot -p $dbnm > "${dbnm}_${dt}.sql"
echo "${dbnm}_${dt}.sql is generated!"
gdrive upload "${dbnm}_${dt}.sql" -p xxxxxxxxxxxxxxxxxxxxxxxxxxx
gdrive list -q "name contains '.sql' and name contains '${dbnm}'"
echo "Uploaded to gdrive/db_back"
;;
*) echo "hmmm invalid options";;
esac
/etc/ssh/sshd_config (mb local test server 192.168.11.104)
# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes
# Accept locale-related environment variables
AcceptEnv LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none
# no default banner path
#Banner /some/path
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
settings.json for vscode remote-browser configuration
ctrl+shift+p to connect
``js
{
"C_Cpp.clang_format_fallbackStyle": "Visual Studio",
"window.zoomLevel": 0,
"workbench.activityBar.visible": false,
"editor.minimap.enabled": false,
"breadcrumbs.enabled": true,
"editor.multiCursorModifier": "alt",
"editor.tabCompletion": "on",
"terminal.integrated.shell.windows": "C:\Program Files\Git\bin\bash.exe",
"remoteBrowser.connectionOptions": {
"host": "192.168.11.101", // MANDATORY
"username": "manageb", // MANDATORY
// "privateKey": "C:/Users/myuser/.ssh/id_rsa", // Path to private key on local machine
"localHostname": "localhost",
"localUsername": "manageb", // Identify as myuser@myhost
"defaultPath": "/var/rakuza_yo/rakuza/" // Default directory to start in on connect (Absolute path)
},
// Optional array to configure additional connections
"remoteBrowser.additionalConnections": [{
"host": "139.162.121.43",
"username": "root",
"defaultPath": "/var/www/whatcode"
}
,
{
"host": "192.168.11.104",
"username": "root",
"defaultPath": "/var/rakuza_leifras/rakuza/reserve_source"
}
,{
"host": "34.85.121.54",
"username": "phalacrocorax",
"privateKey": "C:/Users/user/.ssh/id_rsa",
"defaultPath": "/var/www/html"
}
],
"workbench.colorTheme": "Visual Studio Dark",
}
gitbash config: Options > Looks
font: consolas;
font-size:11;
Frontend Pagination
Bootstrap v4.2.1