wordpress add list of year as archive

<?php
                        if ( isset( $_GET['archive'] ) ) {
                            $archive = $_GET['archive'];
                            $catname = get_term_by( 'slug', $archive, 'archive' )->name;
                        }
                        ?>
                        <?php
                        global $wp;
                        $current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );

                        if ( strstr( $current_url, '/page/' ) ==

AWS IAM : Tips / MFA Enablable role V2

MFAを設定するまでは各機能を触らせたくない
```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowListActions",
            "Effect": "Allow",
            "Action": [
                "iam:ListUsers",
                "iam:ListVirtualMFADevices"
            ],
            "Resource": "*"
        },
        {
            "Sid": "AllowIndividualUserToListOnlyTheirOwnMFA",
            "Effect": "Allow",
            "Action": [
                "iam:ListMFADevices"
            ],
    

video

<video autoplay muted loop playsinline class="video-bg">
    <source src="<?= get_template_directory_uri(); ?>/video/fv.mp4" type="video/mp4">
</video>

client_example.c

#include<linux/in.h>
#include<linux/inet.h>
#include<linux/socket.h>
#include<net/sock.h>
#include<linux/init.h>
#include<linux/module.h>

#define BUFFER_SIZE 1024

int connect_send_recv(void){
    struct socket *sock;
    struct sockaddr_in s_addr;
    unsigned short port_num = 8888;
    int ret = 0;
    char *send_buf = NULL;
    char *recv_buf = NULL;
    struct kvec send_vec, recv_vec;
    struct msghdr send_msg, recv_msg;

    /* kmalloc a send buffer*/
    send_buf = km

meta_query – Posts by Meta Values - meta key

https://rudrastyh.com/wordpress/meta_query.html
$args = array (
	'post_type' => 'post',
	'meta_query' => array(
		'meta_value' => array(
			'key' => 'post-coluna-destacado',
			'value' => true,
			'compare' => '!='
		)
	)
);

Training Resources: Jericho CSS

/* ============================
--- Jericho Template  ---
--- CSS Skeleton for Force ---
============================ */
/* --- FONT OVERRIDE--- */
/* @import url('');

body, p, h1,h2,h3,h4, .field--type-text-with-summary, .company_profile__field--type-string-long, .field--type-text-with-summary, [data-block-internal-id="footerblock"] .company_profile__field--type-string-long, .button, label, ul, a {
  font-family: 'Your Font', sans-serif!important;
} */

/*===============================
------

Наполнение данными поля из инита и установка агента

function sortSync() {
    if (CModule::IncludeModule('iblock')) {
        $arSelect = Array("ID", "NAME", "DATE_ACTIVE_FROM", "catalog_PRICE_1", "PROPERTY_CUSTOM_SORT_PRICE");
        $arFilter = Array("IBLOCK_ID"=>26, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y");
        $res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>1000000000), $arSelect);
        while($ob = $res->GetNextElement())
        {
        $arFields = $ob->GetFields();

            if($arFields['CATALOG

CSS-JS Skeleton for Force

/* ============================
--- CSS Skeleton for Force ---
============================ */
/* --- FONT OVERRIDE--- */
/* @import url('');

body, p, h1,h2,h3,h4, .field--type-text-with-summary, .company_profile__field--type-string-long, .field--type-text-with-summary, [data-block-internal-id="footerblock"] .company_profile__field--type-string-long, .button, label, ul, a {
  font-family: 'Your Font', sans-serif!important;
} */

/*===============================
------------- General -------
==

Use a temporary email for subscribing

Prev [ITS to implement new security measure](https://snippets.cacher.io/snippet/7f38ff9beb2a7dc1e541)
*Use a temporary email for subscribing*

You can't test this; but there’s no reason to trust the server behind the site which sends out bills and invoices.
We live in a world where fake websites populate newsfeeds and social networks every minute of every day—which is why a disposable email address helps protect against all three of these things above (and also provides insurance).
Not just the one in your inbox; it may be everyone's address on the internet.


[Use a temporary email for s

Ajax Load More

https://wordpress.org/plugins/ajax-load-more/
//nas configurações do repeater chamar um shortcode:

<?php 
echo do_shortcode('[post-item-infinite]');
?>

------------------------------

//filtrar por exemplo por tipo de taxonomia:
//$term_obj_list = get_the_terms( $post->ID, 'coluna' );
//ou tipo de post:
//if ( get_post_type() == 'case') {

function post_item_infinite($atts) {	
  $a = shortcode_atts( array(
    'parallax' => '',
	), $atts );
  ob_start();

	$term_obj_list = get_the_terms( $post->ID, 'coluna' );

  if($term_obj_list[0]->tax

GCP - Upload Dataset

# Path to the file to upload to GCP
# It should be absolute, or match the directory where the make command is ran.
LOCAL_PATH="/home/greg/code/Greg-Martin/TaxiFareModel/raw_data/train_1k.csv"

# Bucket directory in which to store the uploaded file.
# Here, data is an arbitrary name.
BUCKET_FOLDER=data

# Name for the uploaded file inside of the bucket.
# We chose not to rename the file that we upload.
BUCKET_FILE_NAME=$(shell basename ${LOCAL PATH})

upload_data:
    @gsutil cp ${LOCAL_PATH} gs:

GCP - Create Bucket

# OBVIOUSLY IN Makefile

PROJECT_ID=wagon-bootcamp-351216
BUCKET_NAME=wagon-data-864-martin
REGION=europe-west1

set_project:
    @gcloud config set project ${PROJECT_ID}
    
create_bucket:
    @gsutil mb -l ${REGION} -p ${PROJECT_ID} gs://${BUCKET_NAME}
    
# EXECUTE WITH
# make set_project
# make create_bucket

GCP - Sumbitting training job to AI platform

gcloud ai-platform jobs submit training ${JOB_NAME} \
  --job-dir gs://${BUCKET_NAME}/${BUCKET_TRAINING_FOLDER}  \
  --package-path ${PACKAGE_NAME} \
  --module-name ${PACKAGE_NAME}.${FILENAME} \
  --python-version=${PYTHON_VERSION} \
  --runtime-version=${RUNTIME_VERSION} \
  --region ${REGION} \
  --stream-logs
  
  # JOB_NAME: an arbitrary name allowing us to identify a training occurence.
              It will be visible in the GCP console once it has ran.
  # BUCKET_NAME: the buc

example_request

<?php

use Bitrix\Main\Web\HttpClient;

define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
define('CHK_EVENT', true);
set_time_limit(0);

require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

$http = new HttpClient(['socketTimeout'=>10]);
$arRequest = [
    'url'=>'https://test.aravia.ru/rest/',
    'user_login'=>'trofimov.a@aravia-prof.ru',
    'user_webhook_token'=>'4gxbsxz0vnxc9tbk',//сгенерированый токен веб хука,
    'fu

Audio api

   <script>
        var audios = [];
        audios[0] = new Audio("/sounds/audio_2019-12-20_11-12-44.mp3");    
        audios[1] = new Audio("/sounds/audio_2019-12-20_11-13-32.mp3");    
        audios[2] = new Audio("/sounds/audio_2019-12-20_11-13-43.mp3");    
        audios[3] = new Audio("/sounds/makak-oda.mp3");    
        
        var sound;
        var playAudio = function(index)
        {
            for (i = 0; i < audios.length; i++)
            {
                sound =