Skip to content

Instantly share code, notes, and snippets.

// https://1writerapp.com/docs/js
interface Editor {
/**
* Returns the range of the current selection in the editor.
* The returned value is an array of two integer values, contains the positions of the first and last characters.
* @example
* ```js
* const range = editor.getSelectedRange(); //value of range is [5, 10]
* ```
Param(
[Parameter(Mandatory, Position = 0)]
[String]$Source,
[Parameter(Mandatory, Position = 1)]
[String]$Destination,
[System.DateOnly]$Date = ([System.DateOnly]::FromDateTime([System.DateTime]::Now)),
[Parameter(Mandatory, Position = 2)]
[String]$Name
)
// ==UserScript==
// @name Inoreader open in background tab
// @namespace http://mono0x.net/
// @version 0.0.1
// @author mono
// @match https://www.inoreader.com/*
// @match https://irodr.netlify.app/*
// @grant GM_openInTab
// @run-at document-end
// ==/UserScript==
$ErrorActionPreference = 'Stop'
foreach ($file in ($args | ForEach-Object { Get-Item $_ } | Sort-Object -Property FullName)) {
if ($file.Name -match '\A\d{8}-\d{6}-') {
# Already renamed (Skip)
continue
}
$timeOptions = if ($file.Name.ToUpper().StartsWith("GX")) {
# GoPro (Shift time zone)
$ErrorActionPreference = 'Stop'
$outputPath = "D:\Desktop\$(date '+%Y%m%d%H%M%S').mp4"
$listFile = New-TemporaryFile
try {
$files = $args | ForEach-Object { Get-Item $_ }
foreach ($file in $files) {
Out-File -Encoding UTF8 -Append -FilePath $listFile -InputObject "file '$($file.FullName)'"
}
{
"name": "gatsby-remark-oembed-mdx-site",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@ardatan/aggregate-error": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@ardatan/aggregate-error/-/aggregate-error-0.0.6.tgz",
"integrity": "sha512-vyrkEHG1jrukmzTPtyWB4NLPauUw5bQeg4uhn8f+1SSynmrOcyvlb1GKQjjgoBzElLdfXCRYX8UnBlhklOHYRQ==",
import { useMemo } from "react"
import { useStaticQuery } from "gatsby"
export const useSearch = (searching) => {
const { allMarkdownRemark } = useStaticQuery(graphql`
query {
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] },
) {
edges {
$ErrorActionPreference = "Stop"
$macAddresses = @($Args | ForEach-Object { $_.Replace(":", "-") })
$header = [byte[]](@(0xFF) * 6)
foreach ($macAddress in $macAddresses) {
$payload = [byte[]]($macAddress.split("-") | ForEach-Object { [Convert]::ToInt32($_, 16) })
$magicPacket = $header + $payload * 16
$client = New-Object System.Net.Sockets.UdpClient
/* ==UserStyle==
@name font-face for Windows
@namespace https://gist.github.com/mono0x
@version 0.0.1
@license MIT
==/UserStyle== */
@font-face {
font-family: "MS Pゴシック";
src: local("Meiryo"), local("メイリオ"), local("MS Pゴシック");
}
/* ==UserStyle==
@name font-face for macOS
@namespace https://gist.github.com/mono0x
@version 0.0.1
@license MIT
==/UserStyle== */
@font-face {
font-family: "MS PGothic";
src: local("Hiragino Kaku Gothic ProN");
}