Skip to content

Instantly share code, notes, and snippets.

View Tanimodori's full-sized avatar
🈵
Stackoverflowed

Tanimodori Tanimodori

🈵
Stackoverflowed
  • China
  • 08:55 (UTC +08:00)
View GitHub Profile
@Tanimodori
Tanimodori / openpgp.txt
Created September 18, 2017 13:04
OpenKeychain 关联用户标识
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:2c6de7b17fe731ca1e3e9fc00f0b2aae1637c972]
@Tanimodori
Tanimodori / RobustXMLParser.py
Last active November 9, 2019 17:24
Robust XML parser for duplicated attributes.
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Exmaple Robust XML parser which is capable of parsing duplicated attributes using html.parser.HTMLParser
Author: Tanimodori
License: Public Domain
Reference: https://stackoverflow.com/questions/31909929/webscraping-with-python3-ignoring-duplicate-attribute-errors
"""
import re
@Tanimodori
Tanimodori / Generics4Zod.ts
Created June 15, 2022 02:56
How to use generic types in Zod
import { z } from 'zod';
// The zod model with generics type in function form
const PaginatedList = <T extends z.ZodTypeAny>(elemType: T) =>
z.object({
// some properties omitted
url: z.string(),
data: z.array(elemType),
});
@Tanimodori
Tanimodori / verify_image.py
Last active October 8, 2022 18:44
Using Python to Verify Image Integrity
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import re
import glob
from PIL import Image
my_path = "./"
files = glob.glob(my_path + "/**/*.*", recursive=True)

ScopedSlotsProxy.vue

<script lang="ts">
  import { defineComponent, h } from 'vue';

  export default defineComponent({
    name: 'ScopedSlotsProxy',
    props: ['as', 'scopedSlots'],
 setup(props, { attrs, slots }) {
@Tanimodori
Tanimodori / antdv-filter.txt
Last active January 5, 2023 01:37
antdv adb filter list
[Adblock Plus 2.0]
! Version: 0.0.1
! Title: antdv.com adb filter list
! Last modified:
! Expires:
! Homepage:
!
antdv.com##.ant-menu-submenu.ant-menu-submenu-horizontal[data-submenu-id="advanced"]
antdv.com##.ant-menu-item.ant-menu-item-only-child[data-menu-id="store"]
antdv.com##.ant-menu-item.ant-menu-item-only-child[data-menu-id="geektime"]
@Tanimodori
Tanimodori / README.md
Created March 1, 2023 01:15 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.