$ nodebrew ls
Use of uninitialized value $b1 in numeric comparison (<=>) at /usr/local/bin/nodebrew line 678.
Use of uninitialized value $a1 in numeric comparison (<=>) at /usr/local/bin/nodebrew line 678.
Use of uninitialized value $a1 in numeric comparison (<=>) at /usr/local/bin/nodebrew line 678.
.DS_Store
v6.3.1
v7.10.0
v8.2.1
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 | |
/** | |
* Basic usage add_meta_box | |
* @link https://developer.wordpress.org/reference/functions/add_meta_box/ | |
*/ | |
add_action( 'add_meta_boxes', 'add_custom_meta_box' ); | |
/** |
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 | |
/** | |
* @link https://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect | |
* @link https://developer.wordpress.org/reference/classes/wp_query/set_404/ | |
*/ | |
function status404() { | |
if ( is_singular( 'hoge' ) ) { | |
global $wp_query; | |
$wp_query->set_404(); |
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
function zeroPadding(number, length) { | |
return (Array(length).join('0') + number).slice(-length); | |
} | |
zeroPadding(240, 10) // 0000000240 | |
/** | |
* String.prototype.padStart() | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart |
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 | |
/** | |
* 画像のURLのサイズ違いのURLを取得する | |
* | |
* @param string $url 画像のURL | |
* @param string $size 画像のサイズ (thumbnail, medium, large or full) | |
*/ | |
function get_attachment_image_src($url, $size) { | |
$image = wp_get_attachment_image_src(get_attachment_id($url), $size); |
tree -N
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>jQuery 3.3 addClass, removeClass</title> | |
</head> | |
<body> |
Hoge
というカスタムフィールドの場合
<mt:Entries>
<mt:EntryDataHogeAsset>
<img src="<mt:AssetThumbnailURL width="90">" alt="<mt:EntryTitle>">
</mt:EntryDataHogeAsset>
</mt:Entries>
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
/** | |
* 備忘録 | |
* @link https://stackoverflow.com/questions/31891694/handle-404-errors-in-urlfetchapp-fetch | |
*/ | |
function fetchPage() { | |
var response = UrlFetchApp.fetch("http://ctrlq.org/404", {muteHttpExceptions: true}); | |
if (response.getResponseCode() == 404) { | |
Logger.log("Web page not found"); | |
} |
NewerOlder