Skip to content

Instantly share code, notes, and snippets.

@bennyhuo
bennyhuo / init.gradle.kts
Last active July 1, 2024 07:34
How to config mirrors for repositories in Gradle without changing the source code of your project?
fun RepositoryHandler.enableMirror() {
all {
if (this is MavenArtifactRepository) {
val originalUrl = this.url.toString().removeSuffix("/")
urlMappings[originalUrl]?.let {
logger.lifecycle("Repository[$url] is mirrored to $it")
this.setUrl(it)
}
}
}
@Gh61
Gh61 / chrome.intellisense.js
Last active October 5, 2023 19:22 — forked from cmc19/chrome.intellisense.js
Visual studio intellisense file for chrome apps and extensions. Generated from latest source code. Manualy added missing properties.
var chrome = {};
chrome.devtools = {};
chrome.declarativeWebRequest = {};
//#region Types
//#region Chrome.AccessibilityObject
chrome.AccessibilityObject = function () {
/// <field name='type' type='string'>The type of this object, which determines the contents of 'details'.</field>
/// <field name='name' type='string'>The localized name of the object, like OK or Password. Do not rely on an exact string match because the text will be in the user's language and may change in the future.</field>
/// <field name='context' type='string'>The localized name of the context for the object, like the name of the surrounding toolbar or group of controls.</field>
/// <field name='details' type=''>Other details like the state, depending on the type of object.</field>
@leoromanovsky
leoromanovsky / extract_sql.pl
Created March 11, 2012 06:59
Extract SQL tables from database dump
#!/usr/bin/perl -w
##############################################################################
##
## Written by: Jared Cheney <jared.cheney@gmail.com>
##
## Original Template written by:
## Brandon Zehm <caspian@dotconf.net> and Jared Cheney <elph@leph.net>
##
## License:
##