This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { execSync } from 'child_process'; | |
import fs from 'node:fs/promises'; | |
import _fs from 'fs'; | |
import path from 'path'; | |
import { parse, isBefore, format, isValid } from 'date-fns'; | |
const directoryPath = __dirname + '/files'; | |
const files = await fs.readdir(directoryPath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assume-unchanged: リポジトリが更新された場合、作業ツリー上の更新を破棄する | |
git update-index --assume-unchanged [FILENAME] | |
git update-index --no-assume-unchanged [FILENAME] | |
# skip-worktree: リポジトリが更新された場合、作業ツリー上の更新を保つ | |
git update-index --skip-worktree [FILENAME] | |
git update-index --no-skip-worktree [FILENAME] | |
# Check file ignore status | |
git ls-files -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"save": "did=`docker ps | awk '$2==\"mysql:5.7\" { print $1 }'` && docker exec -it $did sh -c 'mysqldump wordpress -u wordpress -pwordpress 2> /dev/null' > ./docker-entrypoint-initdb.d/install_wordpress.sql", | |
"bash": "did=`docker ps | awk '$2==\"wordpress:latest\" { print $1 }'` && docker exec -it $did bash" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo find . -name ".DS_Store" -depth -exec rm {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# editorconfig.org | |
root = true | |
[*] | |
end_of_line = lf | |
charset = utf-8 | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sublime.log_commands(True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d -exec chmod 755 {} \; | |
find . -type f -exec chmod 644 {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 言語、文字コードを設定する | |
mb_language('uni'); | |
mb_internal_encoding('UTF-8'); | |
function map_htmlspecialchars($request) | |
{ | |
return array_map(function ($value) { | |
return is_array($value) ? | |
map_htmlspecialchars($value) : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Files ~ "^\.(htaccess|htpasswd)$"> | |
deny from all | |
</Files> | |
Options -Indexes | |
AuthUserFile /var/www/html/.htpasswd | |
# AuthGroupFile /dev/null | |
AuthName "Please enter your ID and password" | |
AuthType Basic | |
require valid-user | |
order deny,allow |
NewerOlder