<?php
$args = ['post_type' => 'post'];
foreach((new Iterative_WP_Query($args)) as $post_id => $post) {
echo get_the_title($post_id);
}
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
#!/bin/bash | |
#shopt -s expand_aliases | |
#source ~/.bash_profile | |
## 日本語化する? | |
echo "日本語化する? [Y/N]" | |
read ANSWER | |
case $ANSWER in | |
"" | "Y" | "y" | "yes" | "Yes" | "YES" ) |
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 | |
# ID1でログインする | |
include __DIR__.'/wp-load.php'; | |
wp_set_auth_cookie(1); | |
header( 'Location: '.admin_url() ); | |
exit; |
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 test($init, $key = 'a') | |
{ | |
$var = $init; | |
$var[$key] = 1; | |
echo var_export($init, true), ': ', is_array($var) ? 1 : 0, "\n"; | |
} | |
test(null); // OK |
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
#!/usr/bin/env python | |
# How to use: | |
# | |
# Ubuntu 16.04: apt install -y python-boto OR apt install -y python3-boto | |
# | |
# Specify the default profile on aws/boto profile files or use the optional AWS_PROFILE env var: | |
# AWS_PROFILE=example ./dehydrated -c -d example.com -t dns-01 -k /etc/dehydrated/hooks/route53.py | |
# | |
# Manually specify hosted zone: |
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 | |
/* | |
Template Name: インクリメンタルサーチページ | |
*/ | |
?> | |
<?php get_header(); ?> | |
<h1>インクリメンタルサーチ</h1> |
ES Class Fields (Stage 2 now)
プライベートフィールドがハッシュな変態記法なのは何でなんだぜ?
class Point {
#x;
#y;
constructor(x = 0, y = 0) {
Time Travel refers to the ability to record a tab and later replay it ([WebReplay][wrr]). The technology is useful for local development, where you might want to:
- pause and step forwards or backwards
- pause and rewind to a prior state
- rewind to the time a console message was logged
- rewind to the time an element had a certain style or layout
- rewind to the time a network asset loaded
- Make sure your gridsome dev server is running:
cd frontend
and thenyarn dev
ornpm run dev
- Install JS GraphQL plugin: https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
- Select everything inside
<page-query>
, click the light bulb icon, choose "Inject language or reference" and select GraphQL, like this:
NOTE: you only have to do this once and then all your .vue files will support GraphQL queries inside <page-query>
tags.