Skip to content

Instantly share code, notes, and snippets.

View DriftwoodJP's full-sized avatar

DriftwoodJP DriftwoodJP

View GitHub Profile
@DriftwoodJP
DriftwoodJP / rename_wp_login.rb
Last active December 22, 2015 02:19
wp-login.php をリネームするスクリプト。
# 初期設定
dir = '/home/<your_id>/public_html/www/<your_wp_dir>/'
filename = 'wp-login.php'
size = 12
original_file = dir + filename
# 指定されたディレクトリに、指定されたファイルがあるか探す
if File.exist?(original_file)
# あれば リネームする
rename = [*1..9, *'A'..'Z', *'a'..'z'].sample(size).join + '_'
@DriftwoodJP
DriftwoodJP / array-to-texttable.php
Last active December 20, 2015 05:29 — forked from Thingmand/array-to-texttable.php
PHP: Array to Text Table Generation Class Japanese Multibyte
<?php
/**
* Array to Text Table Generation Class
*
* @author Tony Landis <[email protected]>
* @link http://www.tonylandis.com/
* @copyright Copyright (C) 2006-2009 Tony Landis
* @license http://www.opensource.org/licenses/bsd-license.php
*/
class ArrayToTextTable