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 alg; | |
import java.util.Arrays; | |
import java.util.Collection; | |
public class BinaryHeap<T extends Comparable<? super T>> { | |
private Object[] m_itemArray; | |
private int m_length; | |
private int m_capacity; |
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
// ==UserScript== | |
// @name Lyric Select | |
// @namespace github.com/mavc | |
// @include http://www.kasi-time.com/* | |
// @include http://j-lyric.net/* | |
// @include https://www.uta-net.com/* | |
// @version 1.0 | |
// @grant unsafeWindow | |
// ==/UserScript== |
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
import argparse | |
import re | |
import sys | |
PAT = re.compile(r'^\*\.?(\w+):\s+#([a-fA-F0-9]{6})') | |
MAPPING = { | |
'cursorColor': 'CursorColour', | |
'background': 'BackgroundColour', | |
'foreground': 'ForegroundColour', |
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
executeInBackground(async (data) => { | |
return browser.windows.create({url: data.element.linkHref}); | |
}, [data]).catch((e) => { | |
console.error(e); | |
}); |
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
executeInBackground((data) => { | |
return data.element.linkHref | |
? commandOpenLinkInNewTab(data) | |
: commandNewTab(data); | |
}, [data]).catch((e) => { | |
console.error(e); | |
}); |
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
executeInBackground(async () => { | |
const tabs = await browser.tabs.query({currentWindow: true}); | |
const activeTab = tabs.find((t) => t.active); | |
if (activeTab.index > 0) { | |
// Set the current tab to the tab on the left. | |
let nextTab = tabs.find((t) => t.index == activeTab.index - 1); | |
await browser.tabs.update(nextTab.id, {active: true}); | |
} | |
// Close the current tab. | |
await browser.tabs.remove(activeTab.id); |
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
from __future__ import print_function | |
import os | |
from os import path | |
from PIL import Image | |
import shutil | |
from sys import argv | |
EXTENSIONS = ('.jpg', '.png') | |
WALLPAPER_RATIO_MIN = 1.25 |
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
// ==UserScript== | |
// @name twimg-icon | |
// @namespace github.com/mavc | |
// @description Download source images on Twitter. | |
// @include https://twitter.com/* | |
// @exclude https://twitter.com/i/* | |
// @version 1.1.1 | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Thread.And.Find.Out | |
// @namespace mavc | |
// @description Add < Prev and Next > Navigation for RAFO threads. | |
// @match http://*.readandfindout.com/* | |
// @version 1.0.0 | |
// ==/UserScript== | |
function getNext(t) { | |
// get first child, next sibling, or getNext() of parent. |
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
// ==UserScript== | |
// @name Kasi-Time Select | |
// @namespace github.com/mavc | |
// @include http://www.kasi-time.com/* | |
// @version 1.0 | |
// @grant unsafeWindow | |
// ==/UserScript== | |
(function() { | |
/* |
NewerOlder