Skip to content

Instantly share code, notes, and snippets.

View eriwen's full-sized avatar

Eric Wendelin eriwen

View GitHub Profile
@eriwen
eriwen / Gradle Public API
Created April 17, 2017 15:25
Definition of Gradle Public API for versioning/regression testing purposes
include 'org/gradle/*'
include 'org/gradle/api/**'
include 'org/gradle/authentication/**'
include 'org/gradle/buildinit/**'
include 'org/gradle/caching/**'
include 'org/gradle/external/javadoc/**'
include 'org/gradle/ide/**'
include 'org/gradle/ivy/**'
include 'org/gradle/jvm/**'
include 'org/gradle/language/**'
@eriwen
eriwen / github-labels-config.json
Created May 7, 2017 22:34
Configuration for github-labels node tool
[{
"name": "a:bug",
"color": "d93f0b"
}, {
"name": "a:chore",
"color": "1d76db"
}, {
"name": "a:feature",
"color": "0e8a16"
}, {
@eriwen
eriwen / gradle-internal-api-usage.sql
Last active February 21, 2024 12:09
Get most frequent usage of Gradle Internal APIs from BigQuery GitHub Data
SELECT
class,
COUNT(*) count
FROM (
SELECT
REGEXP_REPLACE(line, r'import |;', '') AS class,
c.id
FROM (
SELECT
SPLIT(c.content, '\n') line,
@eriwen
eriwen / groovy-hl.xml
Created April 13, 2018 18:38
Groovy syntax highlighting config for xslthl
<?xml version="1.0" encoding="UTF-8"?>
<!--
Syntax highlighting definition for Groovy
xslthl - XSLT Syntax Highlighting
http://sourceforge.net/projects/xslthl/
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
This software is provided 'as-is', without any express or implied
@eriwen
eriwen / kotlin-hl.xml
Created April 13, 2018 18:42
Kotlin syntax highlighting config for xslthl
<?xml version="1.0" encoding="UTF-8"?>
<!--
Syntax highlighting definition for Kotlin
xslthl - XSLT Syntax Highlighting
http://sourceforge.net/projects/xslthl/
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
This software is provided 'as-is', without any express or implied
@eriwen
eriwen / init.gradle
Created May 3, 2018 15:03
Fix stderr in plain console in Gradle 4.7
rootProject {
def errorFile = file("${rootProject.buildDir}/errors.log")
def errorListener = new ErrorCapture(errorFile)
allprojects {
logging.addStandardErrorListener(errorListener)
tasks.all {
logging.addStandardErrorListener(errorListener)
}
}
}
@eriwen
eriwen / multi-language-sample.html
Last active February 21, 2024 12:08
Multi-language code samples on the web
<div class="exampleblock testable-sample multi-language-sample">
<div class="title">build.gradle</div>
<div class="content">
<pre class="prettyprint highlight"><code class="language-groovy" data-lang="groovy">logging.captureStandardOutput LogLevel.INFO
println 'A message which is logged at INFO level'</code></pre>
</div>
</div>
<div class="exampleblock testable-sample multi-language-sample">
<div class="title">build.gradle.kts</div>
@eriwen
eriwen / multi-language-sample-adoc-macros.adoc
Last active February 21, 2024 12:08
Multi-language examples for asciidoctor, including all the intermediate transforms, CSS, and HTML, and asciidoc source
var flakyTests = emptyList<String>()
if (project.file("flaky-tests.txt").exists()) {
flakyTests = project.file("flaky-tests.txt").readLines(Charset.defaultCharset())
}
tasks.test {
filter {
flakyTests.forEach(::excludeTestsMatching)
}
}
@eriwen
eriwen / gist:187610
Created September 15, 2009 20:21 — forked from sanbornm/gist:177420
Pythonic site monitor
#!/usr/bin/env python
# sample usage: checksites.py eriwen.com nixtutor.com yoursite.org
import pickle, os, sys, logging
from httplib import HTTPConnection, socket
from smtplib import SMTP
def email_alert(message, status):
fromaddr = 'you@gmail.com'