Skip to content

Instantly share code, notes, and snippets.

View maou-shonen's full-sized avatar

魔王少年(maou shonen) maou-shonen

View GitHub Profile
@maou-shonen
maou-shonen / Suspense.ts
Last active September 17, 2021 07:11 — forked from ffxsam/Suspense.ts
Vue 3's Suspense component, ready for use in Nuxtjs 2.x (TypeScript)
import Vue from 'vue'
export default Vue.extend({
name: 'Suspense',
render(createElement) {
const defaultVNode = this.$slots.default![0]
const isdefaultVNodeExist =
defaultVNode.elm !== undefined ||
defaultVNode.componentOptions !== undefined ||
#!/usr/bin/python
# A Wake on LAN program that allows you to send magic packets over the Internet
# needs python >= 3.6
import socket, struct, argparse
class WakeOnLan():
def _makeMagicPacket(self, mac_address_str: str) -> bytes:
# Take the entered MAC address and format it to be sent via socket
mac_address = mac_address_str.split(':')