検索窓に「larger:10m」とすると10Mbyte以上のメールが出てくるので消せばよい
Googleスプレッドシートで数値にプラスマイナスを表示
- 数値のあるセルを選択
- ツールバーの「表示形式の詳細設定」アイコンをクリック
- メニューにある「表示形式の詳細設定」 > 「カスタム数値形式」をクリック
- 入力フィールドに +#;-#;0 と入力し「適用」をクリック
Googleスプレッドシートのアドオン「Google Analyticsは使えなくなった模様」
便利だったのに困る。
色々進化するのはいいけど、置いていかないでくれ・・・
メモ:さくらのwordpressクソほど重い XServerに引っ越したらクソ早い
XServerにはWordpress引っ越しツールもあるのでめちゃ楽。
さよならさくら。
windows環境にpythonインストールしたけどパスが通ってないなら、再度インストーラーを起動する
なんでか最初のインストールではだめだった
「Add Python to environment variables」にチェックを入れて「Install」をクリックすると治る
htaccessによるリダイレクト(サイトの引越し)
恒久的引っ越しのコード
# Redirect Redirect permanent / https://movesaki.net/
ネタ元でコード生成できるよ
PHPのシンプル速度計測コード
<?php $starttime = microtime(true); for($i = 0; $i<10000000; $i++) { } $looptime = microtime(true) – $starttime; $starttime = microtime(true); $j=0; for($i=0; $i<10000000; $i++) { $j = $j + 1; } echo microtime(true) – $starttime – $looptime . “n”; ?>
WordPress CSSとJSファイルの遅延読み込み
functions.phpに追記する
CSS
/*--------------------------------------------------------------*/ /* レンダリングを妨げるリソースの除外 CSSのIDを遅延させる処理 */ /*--------------------------------------------------------------*/ function my_dequeue_plugin_files(){ wp_dequeue_style('crayon'); wp_dequeue_style('crayon-theme-neon'); wp_dequeue_style('crayon-font-monaco'); wp_dequeue_style('contact-form-7'); wp_dequeue_style('pz-linkcard'); wp_dequeue_style('responsive-lightbox-nivo'); wp_dequeue_style('responsive-lightbox-nivo-default'); } add_action( 'wp_enqueue_scripts', 'my_dequeue_plugin_files', 9999); add_action('wp_head', 'my_dequeue_plugin_files', 9999); function my_enqueue_plugin_files(){ wp_enqueue_style('crayon'); wp_enqueue_style('crayon-theme-neon'); wp_enqueue_style('crayon-font-monaco'); wp_enqueue_style('contact-form-7'); wp_enqueue_style('pz-linkcard'); wp_enqueue_style('responsive-lightbox-nivo'); wp_enqueue_style('responsive-lightbox-nivo-default'); } add_action('wp_footer', 'my_enqueue_plugin_files'); /*-----------------------------------------------------------------*/
JS
/*-----------------------------------------------------------------*/ /* レンダリングを妨げるリソースの除外 JSファイルを遅延させる処理 */ /*-----------------------------------------------------------------*/ if(!(is_admin())){ function replace_scripttag($tag){ if(!preg_match('/defer/',$tag)){ return str_replace("type='text/javascript'",'async',$tag); } return $tag; } add_filter('script_loader_tag','replace_scripttag'); } /*--------------------------------------------------------------*/
PHPでCSV一行ずつ読み込み
<?php // 読み込み用にtest.csvを開きます。 $f = fopen("./test.csv", "r"); // test.csvの行を1行ずつ読み込みます。 while($line = fgetcsv($f)){ // 読み込んだ結果を表示します。 var_dump($line); } // test.csvを閉じます。 fclose($f); ?>