Skip to content

Instantly share code, notes, and snippets.

View olegcherr's full-sized avatar

Oleg Cherr olegcherr

View GitHub Profile
@itzg
itzg / build.gradle
Last active December 30, 2015 22:32
This snippet shows how to leverage decoupled, multi-project builds in Gradle.
def sibling = { group, name, version ->
try {
def dep = project(":$name")
if (dep.version == version) {
logger.info("Using locally checked out $group:$name")
return dep
}
logger.debug("Version mismatch for $group:$name, expected $version but had ${dep.version}")
} catch (UnknownProjectException e) {
logger.debug("Project $group:$name was missing")
@termi
termi / crossBrowser_initKeyboardEvent.js
Last active June 13, 2023 02:01
Cross-browser initKeyboardEvent
void function() {//closure
var global = this
, _initKeyboardEvent_type = (function( e ) {
try {
e.initKeyboardEvent(
"keyup" // in DOMString typeArg
, false // in boolean canBubbleArg
, false // in boolean cancelableArg
, global // in views::AbstractView viewArg
@xianminx
xianminx / gist:4192339
Created December 3, 2012 03:03
getInstallerPackageName returns null
We couldn’t find that file to show.
@ijprest
ijprest / toupper.bat
Created September 10, 2011 01:52
CMD Batch file implementation of toupper() and tolower()
@echo off & SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
SET STR=Test String
SET STR
call :tolower STR
SET STR
call :toupper STR
set STR
goto :EOF
:: toupper & tolower; makes use of the fact that string