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
#!/bin/perl | |
#---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0 | |
# $ perl gemstring.pl eagcdfbe 1 4 1 4 2 1 3 | |
use v5.10; | |
use strict; | |
use integer; | |
# no Memoize; # :-) |
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
Option Explicit | |
Public Declare Sub MoveMemory Lib "kernel32.dll" Alias "RtlMoveMemory" ( _ | |
Destination As Any, _ | |
Source As Any, _ | |
ByVal Length As Long) | |
Public Function sprintf(ByRef FormatString As String, ParamArray Arguments() As Variant) As String | |
Dim h As OLE_HANDLE | |
Dim hTerm As OLE_HANDLE |
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 $grep(o, v, p = '') { | |
$grep.known = [] | |
return $grep.find(o, v, p) | |
} | |
$grep.match = function (e, v) { | |
return v instanceof RegExp ? typeof e !== 'object' && typeof e !== 'function' && v.test(String(e)) : e === v | |
} | |
$grep.pandora = function (key) { |
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
const makeDateRangeRegexp = (from, to) => { | |
const indices = Array.from('01235689') | |
const unders = indices.map(i => { | |
const digit = from[i] | |
return digit > 0 ? from.slice(0, i) + `[0-${digit - 1}]` : null | |
}) | |
const overs = indices.map(i => { |
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
exec 3<>/dev/tcp/$server/3389 | |
xxd -r -p <<REQ >&3 | |
03 00 00 2a | |
25 e0 00 00 00 00 00 | |
43 6f 6f 6b 69 65 3a 20 6d 73 74 73 68 61 73 68 3d 70 69 6e 67 0d 0a | |
01 00 08 00 00 00 00 00 | |
REQ | |
xxd -l 11 <&3 > debug.log |
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
DROP FUNCTION IF EXISTS FROM_BASE64; | |
DELIMITER ;; | |
CREATE FUNCTION FROM_BASE64 (base64 BLOB) RETURNS BLOB DETERMINISTIC SQL SECURITY INVOKER | |
BEGIN | |
DECLARE plain BLOB DEFAULT ''; | |
DECLARE o INTEGER DEFAULT 0; |
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
document.addEventListener('DOMContentLoaded', _ => { | |
const canvas = document.querySelector('#canvas') | |
const context = canvas.getContext('2d') | |
context.font = '300px "Yu Mincho"' | |
context.fillStyle = 'white' | |
context.fillRect(0, 0, canvas.width, canvas.height) | |
context.textBaseline = 'top' |
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
document.addEventListener('DOMContentLoaded', _ => { | |
const x0208 = [ 0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B,0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x301C,0x2016,0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x201D,0xFF08,0xFF09,0x3014,0x3015,0xFF3B,0xFF3D,0xFF5B,0xFF5D,0x3008,0x3009,0x300A,0x300B,0x300C,0x300D,0x300E,0x300F,0x3010,0x3011,0xFF0B,0x2212,0x00B1,0x00D7,0x00F7,0xFF1D,0x2260,0xFF1C,0xFF1E,0x2266,0x2267,0x221E,0x2234,0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFFE5,0xFF04,0x00A2,0x00A3,0xFF05,0xFF03,0xFF06,0xFF0A,0xFF20,0x00A7,0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7,0x25C6,0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B,0x3012,0x2192,0x2190,0x2191,0x2193,0x3013,0x2208,0x220B,0x2286,0x2287,0x2282,0x2283,0x222A,0x2229,0x2227,0x2228,0x00AC,0x21D2,0x21D4,0x2200,0x2203,0x2220,0x22A5,0x2312,0x2202,0x2207,0x2261,0x2252,0x226A,0x226B,0x221A,0x223D,0x221D,0x223 |
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
document.addEventListener('DOMContentLoaded', _ => { | |
const x0208 = [ 0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B,0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x301C,0x2016,0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x201D,0xFF08,0xFF09,0x3014,0x3015,0xFF3B,0xFF3D,0xFF5B,0xFF5D,0x3008,0x3009,0x300A,0x300B,0x300C,0x300D,0x300E,0x300F,0x3010,0x3011,0xFF0B,0x2212,0x00B1,0x00D7,0x00F7,0xFF1D,0x2260,0xFF1C,0xFF1E,0x2266,0x2267,0x221E,0x2234,0x2642,0x2640,0x00B0,0x2032,0x2033,0x2103,0xFFE5,0xFF04,0x00A2,0x00A3,0xFF05,0xFF03,0xFF06,0xFF0A,0xFF20,0x00A7,0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7,0x25C6,0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B,0x3012,0x2192,0x2190,0x2191,0x2193,0x3013,0x2208,0x220B,0x2286,0x2287,0x2282,0x2283,0x222A,0x2229,0x2227,0x2228,0x00AC,0x21D2,0x21D4,0x2200,0x2203,0x2220,0x22A5,0x2312,0x2202,0x2207,0x2261,0x2252,0x226A,0x226B,0x221A,0x223D,0x221D,0x223 |
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
using Microsoft.VisualBasic; | |
using NlsTest; | |
using System; | |
using System.Globalization; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
const int COMPARE_STRING = 1; | |
const int NORM_IGNOREWIDTH = 0x00020000; |