This file contains 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
# 起因:https://nga.178.com/read.php?tid=30008586 | |
# 依赖库:pip install requests lxml cssselect | |
import re | |
import requests | |
from lxml import etree | |
headers = { | |
'authority': 'nga.178.com', | |
'pragma': 'no-cache', |
This file contains 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
using UnityEditor; | |
using UnityEngine; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
// Object rendering code based on Dave Carlile's "Create a GameObject Image Using Render Textures" post | |
// Link: http://crappycoding.com/2014/12/create-gameobject-image-using-render-textures/ |
This file contains 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
// 来源: https://www.bilibili.com/video/BV1LB4y1A7VX | |
/** | |
生命周期示意图: | |
https://edotor.net/?engine=dot#digraph%20g%7B%0A%20%20rankdir%3DLR%3B%0A%20%20node%20%5Bshape%3Dbox%5D%3B%0A%0A%20%20%22onAwake%22%20-%3E%20%22onAction%22%20-%3E%20%22onDestroy%22%0A%20%20%0A%20%20%22Buff%E5%8A%A0%E5%85%A5%E7%AE%A1%E7%90%86%E5%99%A8%EF%BC%8C%E8%B0%83%E7%94%A8%22%20-%3E%20%22onAwake%22%20-%3E%20%22%E5%88%B0%E8%BE%BE%E6%89%A7%E8%A1%8C%E6%97%B6%E6%9C%BA%EF%BC%8C%E8%B0%83%E7%94%A8%22%20-%3E%20%22onAction%22%20-%3E%20%22%E5%88%B0%E8%BE%BE%E9%94%80%E6%AF%81%E6%97%B6%E6%9C%BA%EF%BC%8C%E8%B0%83%E7%94%A8%22%20-%3E%20%22onDestroy%22%0A%7D | |
digraph g{ | |
rankdir=LR; | |
node [shape=box]; | |
"onAwake" -> "onAction" -> "onDestroy" |
This file contains 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
""" | |
MIT License | |
Copyright (c) 2021 fy | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains 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
// 一个简易事件系统,参考了mitt和nanoevents | |
// https://github.com/developit/mitt | |
// https://github.com/ai/nanoevents | |
// An event handler can take an optional event argument | |
// and should not return a value | |
export type EventHandler = (...args: any) => void; | |
export interface EventsMap { | |
[event: string]: any; |
This file contains 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
<!-- Use preprocessors via the lang attribute! e.g. <template lang="pug"> --> | |
<template> | |
<div id="app"> | |
<h1>Spine Previewer</h1> | |
<div id="player" style="margin-bottom: 10px"></div> | |
<button ref="holder">Drag JSON/Atlas/Images to Here</button> | |
<button @click="doSomething" :class="{ disabled: !conditionsOk }"> | |
Load | |
</button> | |
<button @click="reset">Reset</button> |
This file contains 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 python3 | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
""" | |
ungoogled-chromium build script for Microsoft Windows | |
""" |
This file contains 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
package main | |
import ( | |
"context" | |
"errors" | |
"fmt" | |
"io" | |
"log" | |
"net/rpc" | |
"net/rpc/jsonrpc" |
This file contains 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
/** | |
Copyright (c) 2018 fy | |
This software is provided 'as-is', without any express or implied | |
warranty. In no event will the authors be held liable for any damages | |
arising from the use of this software. | |
Permission is granted to anyone to use this software for any purpose, | |
including commercial applications, and to alter it and redistribute it | |
freely, subject to the following restrictions: |
This file contains 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
import os | |
import sys | |
def run(): | |
head, *data = input('> ').strip().split(' ') | |
if head in ['ls', 'dir']: | |
path = data[0] if len(data) else '' | |
for i in os.listdir(path): | |
print(i) |
NewerOlder