Skip to content

Instantly share code, notes, and snippets.

@eight04
eight04 / Obsidian.xml
Last active July 10, 2023 12:37
Notepad++ JSON lexer for obsidian theme
<LexerType name="json" desc="JSON" ext="">
<WordsStyle name="DEFAULT" styleID="0" fgColor="E0E2E4" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="NUMBER" styleID="1" fgColor="FFCD22" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="STRING" styleID="2" fgColor="EC7600" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="STRINGEOL" styleID="3" fgColor="808080" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="PROPERTYNAME" styleID="4" fgColor="678CB1" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="ESCAPESEQUENCE" styleID="5" fgColor="FF8409" bgColor="293134" fontName="" fontStyle="1" fontSize="" />
<WordsStyle name="LINECOMMENT" styleID="6" fgColor="008000" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="BLOCKCOMMENT" styleID="7" fgColor="008000" bgColor="293134" fontName="" fontStyle="0" fontSize="" />
<WordsStyle
@eight04
eight04 / Firefox Result
Created July 20, 2015 10:40
[JavaScript] Will duplicate items affect the performance of Array.sort?
"size=1, range=1: 0"
"count=0"
"size=10, range=1: 0"
"count=9"
"size=100, range=1: 0"
"count=99"
"size=1000, range=1: 1"
"count=999"
"size=10000, range=1: 2"
"count=9999"
@eight04
eight04 / uao_decode.py
Last active September 27, 2021 02:57 — forked from andycjw/uao_decode.py
#! python3
import codecs
import struct
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
pass
@eight04
eight04 / gist:4ce675452c2161fe3045
Created October 24, 2014 02:20
[Less] Finding GCD
.gcd(@v1, @v2) when (@v1 < @v2) {
.gcd(@v1, @v2 - @v1);
}
.gcd(@v1, @v2) when (@v1 > @v2) {
.gcd(@v1 - @v2, @v2);
}
.gcd(@v1, @v2) when (@v1 = @v2){
@return: @v1;
@eight04
eight04 / gist:6093d12ed14250566650
Created September 15, 2014 15:23
GM_config style
/* iframe */
#GM_config {
border-radius: 1em;
box-shadow: 0 0 1em black;
border: 1px solid grey!important;
}
/* passed to GM_config.init */
body {