Skip to content

Instantly share code, notes, and snippets.

View Synkied's full-sized avatar
🏠
Working from home

Synkied

🏠
Working from home
View GitHub Profile
@Synkied
Synkied / 词性标记.md
Created July 12, 2022 07:05 — forked from gumblex/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

  • 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
  • 虚词:副词、介词、连词、助词、拟声词、叹词。

ICTPOS3.0词性标记集

n 名词

nr 人名

@Synkied
Synkied / languages.json
Created June 4, 2020 19:15 — forked from joshuabaker/languages.json
List of languages with ISO 639-1 Alpha-2 codes in JSON.
[
{
"code": "aa",
"name": "Afar",
"native": "Afar"
},
{
"code": "ab",
"name": "Abkhazian",
"native": "Аҧсуа"
@Synkied
Synkied / shortcode-order-items.php
Created October 12, 2018 12:38
Hide chained products from order-details page in Woocommerce with woocommerce-warranty activated
<?php if ( $item_has_rma ): ?>
<tr>
<td class="check-column">
<input type="checkbox" name="idx[]" value="<?php echo $item_idx; ?>" />
</td>
<td>
<?php
printf(
__('%s x %d', 'wc_warranty'),
$product->get_title(),
<tbody>
<?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : $item_total = $order->get_item_meta($item_id, '_line_total', true); ?>
<?php if( $item_total > 0 ): ?>
<tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', $item_id, $this->type, $this->order, $item_id ); ?>">
<td class="product">
<?php $description_label = __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
<span class="item-name"><?php echo $item['name']; ?></span>
<?php do_action( 'wpo_wcpdf_before_item_meta', $this->type, $item, $this->order ); ?>
<span class="item-meta"><?php echo $item['meta']; ?></span>
<dl class="meta">
<tbody>
<?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : $item_total = $order->get_item_meta($item_id, '_line_total', true); ?>
<?php if( $item_total > 0 ): ?>
<tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', $item_id, $this->type, $this->order, $item_id ); ?>">
<td class="product">
<?php $description_label = __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
<span class="item-name"><?php echo $item['name']; ?></span>
<?php do_action( 'wpo_wcpdf_before_item_meta', $this->type, $item, $this->order ); ?>
<span class="item-meta"><?php echo $item['meta']; ?></span>
<dl class="meta">
@Synkied
Synkied / gist:cb17b923bd2431e004e726f2fcbea976
Created October 12, 2018 12:37
woocommerce-pdf-invoices-packing-slips hide products with price set to 0
<tbody>
<?php $items = $this->get_order_items(); if( sizeof( $items ) > 0 ) : foreach( $items as $item_id => $item ) : $item_total = $order->get_item_meta($item_id, '_line_total', true); ?>
<?php if( $item_total > 0 ): ?>
<tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', $item_id, $this->type, $this->order, $item_id ); ?>">
<td class="product">
<?php $description_label = __( 'Description', 'woocommerce-pdf-invoices-packing-slips' ); // registering alternate label translation ?>
<span class="item-name"><?php echo $item['name']; ?></span>
<?php do_action( 'wpo_wcpdf_before_item_meta', $this->type, $item, $this->order ); ?>
<span class="item-meta"><?php echo $item['meta']; ?></span>
<dl class="meta">