This file contains hidden or 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 ( | |
| "container/list" | |
| "flag" | |
| "fmt" | |
| "github.com/bwmarrin/discordgo" | |
| "os" | |
| "os/signal" | |
| "strings" |
This file contains hidden or 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 ( | |
| "bufio" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "os" | |
| "strconv" | |
| "strings" |
This file contains hidden or 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
| <script> | |
| class Meta { | |
| static id = 0 // 流水號 | |
| static GetID() { | |
| return ++Meta.id | |
| } | |
| constructor() { | |
| console.log("meta created.") |
This file contains hidden or 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
| export async function ImportModule(url: string) { | |
| const res = await fetch(url) | |
| const newBlob = new Blob([(await res.text())],{type: 'text/javascript'}) | |
| return (await import(URL.createObjectURL(newBlob))) | |
| } |
This file contains hidden or 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
| function prettifyXml(sourceXml) | |
| { | |
| const xmlDoc = new DOMParser().parseFromString(sourceXml, 'application/xml'); | |
| const xsltDoc = new DOMParser().parseFromString([ | |
| // describes how we want to modify the XML - indent everything | |
| '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">', | |
| ' <xsl:strip-space elements="*"/>', | |
| ' <xsl:template match="para[content-style][not(text())]">', // change to just text() to strip space in text nodes | |
| ' <xsl:value-of select="normalize-space(.)"/>', | |
| ' </xsl:template>', |
This file contains hidden or 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 ( | |
| "bufio" | |
| "log" | |
| "os" | |
| "time" | |
| ) | |
| type User struct { |
This file contains hidden or 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
| <filetype binary="false" default_extension="ps1" description="powershell" name="powershell"> | |
| <highlighting> | |
| <options> | |
| <option name="LINE_COMMENT" value="#" /> | |
| <option name="COMMENT_START" value="<#" /> | |
| <option name="COMMENT_END" value="#>" /> | |
| <option name="HEX_PREFIX" value="" /> | |
| <option name="NUM_POSTFIXES" value="" /> | |
| <option name="HAS_BRACES" value="true" /> | |
| <option name="HAS_BRACKETS" value="true" /> |
This file contains hidden or 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 ( | |
| "image" | |
| "image/color" | |
| "image/draw" | |
| "image/png" | |
| "os" | |
| ) |