Homebrew https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# install wget
brew install wget
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# install wget
brew install wget
const ENMessages = { | |
"welcome": "Welcome", | |
"default": { | |
"login": "Login", | |
"email_login": "Email login", | |
"social_login": "Social login", | |
"web3_login": "Web3.0 login", | |
"logout": "Logout", | |
"account": "Account", | |
"create_account": "Create an account", |
/** | |
* @example ArrayPluck([{name: 'A}, {name: 'B'}], 'name') | |
*/ | |
function ArrayPluck<T, K extends keyof T>(arr: T[], key: K): T[K][] { | |
return arr.map(i => i[key]); | |
} | |
/** | |
* @example ObjectPluck({brand: "BMW", manufacturer:"BF", model: "750"}, ["manufacturer", "model"]); | |
*/ |
/** | |
* 这一定有点用 | |
*/ | |
import { useEffect, useRef, useState } from "react"; | |
export default function Header() { | |
const attrs = useRef( | |
new Map( | |
Object.entries({ | |
k_c: "89e39910e91", |
import React, { useState, useContext, createContext } from 'react'; | |
import ReactDOM from 'react-dom'; | |
function log(...str){ | |
console.log(...str) | |
} | |
const rowStyle = { | |
display: 'flex' | |
} |
## Logs | |
``` | |
kubectl logs my-pod # dump pod logs (stdout) | |
kubectl logs -l name=myLabel # dump pod logs, with label name=myLabel (stdout) | |
kubectl logs my-pod --previous # dump pod logs (stdout) for a previous instantiation of a container | |
kubectl logs my-pod -c my-container # dump pod container logs (stdout, multi-container case) | |
kubectl logs -l name=myLabel -c my-container # dump pod logs, with label name=myLabel (stdout) | |
kubectl logs my-pod -c my-container --previous # dump pod container logs (stdout, multi-container case) for a previous instantiation of a container |
<?php | |
require_once('BFI_Thumb.php'); | |
add_filter( 'the_content', 'itc_the_content_img_filter', 999 ); | |
/** | |
* Reduces size of images in posts using bfi_thumb | |
* | |
*/ | |
function itc_the_content_img_filter( $content ) { | |
/* Add here the width you prefer (max width of your posts) */ |
<?php | |
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
add_action('admin_menu', 'my_theme_options_menu'); | |
function my_theme_options_menu() { | |
add_action('admin_print_scripts', 'my_options_admin_scripts'); | |
add_action('admin_print_styles', 'my_options__admin_styles'); |
<?php | |
$w = '350'; | |
$h = '200'; | |
if (has_post_thumbnail()) { | |
$large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); | |
echo '<img class="wp-post-image" src="' . get_bloginfo("template_url") . '/timthumb.php?src=' . $large_image_url[0] . '&w=' . $w . '&h=' . $h . '" alt="' . get_the_title() . '" title="#htmlcaption' . get_the_ID() . '" /></a>'; | |
} else { | |
echo '<img src="http://fakeimg.pl/350x200/?text=NoPictrue&font=lobster" alt="no pictrue" />'; | |
} | |
?> |