This file contains hidden or 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
C:\Users\XXXXX\.ssh> ssh-keygen | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (//.ssh/id_rsa): C:\Users\XXXXX\.ssh\id_rsa | |
Enter passphrase (empty for no passphrase): | |
Enter same passphrase again: | |
Your identification has been saved in C:\Users\XXXXX\.ssh\id_rsa. | |
Your public key has been saved in C:\Users\XXXXX\.ssh\id_rsa.pub. |
This file contains hidden or 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
// Git使い方メモ | |
// @see http://www.backlog.jp/git-guide/intro/intro1_1.html | |
// version check | |
git --version | |
// settings --------------------------------------------------------- |
This file contains hidden or 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
// Gulpを使うためのメモ | |
// NODE JS インストール | |
https://nodejs.org/en/ | |
// Gulpインストール | |
npm install -g gulp | |
// NPM | |
npm init |
This file contains hidden or 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 | |
/** | |
* 日本からのアクセスかを判断する | |
*/ | |
function is_access_from_japan(){ | |
if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) || empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { | |
return false; // よくわからなければ海外からのアクセスとして判定する | |
} |
This file contains hidden or 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 | |
define( "O_SYSTEM_CRYPT_KEY" , "OrehaJaian!Gakidaisho!OiNobitaButtobasuzo!" ); // 暗号化キー | |
define( "REPLACE_MAIL_ADDRESS" , "[email protected]" ); // 置換対象となるメールアドレス | |
// コンタクトフォーム7にhiddenフィールドを追加 | |
add_filter( 'wpcf7_form_hidden_fields', 'oc_wpcf7_form_hidden_fields'); | |
function oc_wpcf7_form_hidden_fields( $hidden ) { | |
$email = "[email protected]"; // 送信したいアドレスをhiddenフィールドに暗号化して設定しておく | |
$cript_mail = openssl_encrypt($email, 'AES-128-ECB', O_SYSTEM_CRYPT_KEY); |
This file contains hidden or 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 | |
/** | |
* ユーザアーカイブページにコメント機能を付けたくて実装してみた。 | |
* 特定権限のユーザならば、コメント専用投稿タイプの記事を1記事だけ追加する。 | |
* ユーザ削除時にはその記事を削除するという動きをしてます。 | |
* ただ、結局この機能は実装しなくなったので詳細の詰めがもっと必要だと思います\(^o^)/ | |
*/ | |
// 権限チェック関数 | |
function oc_is_member($authorid) { | |
return user_can($authorid, "gold_member") || user_can($authorid, "free_member"); |
This file contains hidden or 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
mysqldump -h 127.0.0.1 -u USERNAME -p DBNAME > dump.sql |
This file contains hidden or 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
# hogehoge.tar.gzという名前でhogeフォルダを圧縮する | |
tar cvzf hogehoge.tar.gz hoge | |
# hogehoge.tar.gzを解凍する | |
tar vxzf hogehoge.tar.gz |
This file contains hidden or 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
mysql -h 127.0.0.1 -u aaXXXXXXX -p |