(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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) | |
} | |
} | |
} |
import rx.Observable; | |
import rx.subjects.PublishSubject; | |
import rx.subjects.SerializedSubject; | |
import rx.subjects.Subject; | |
/** | |
* @author <a href="mailto:jaredsburrows@gmail.com">Jared Burrows</a> | |
*/ | |
public final class RxBus { | |
private final Subject<Object, Object> bus = new SerializedSubject<>(PublishSubject.create()); |
package freemarker; | |
import freemarker.core.Environment; | |
import freemarker.template.TemplateDirectiveBody; | |
import freemarker.template.TemplateDirectiveModel; | |
import freemarker.template.TemplateException; | |
import freemarker.template.TemplateModel; | |
import freemarker.template.TemplateModelException; | |
import java.io.IOException; |
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
#!/bin/bash | |
#Modify this with your IP range | |
MY_IP_RANGE="192\.168\.1" | |
#You usually wouldn't have to modify this | |
PORT_BASE=5555 | |
#List the devices on the screen for your viewing pleasure | |
adb devices |
/** | |
* User: Michael Chen | |
* Email: yidongnan@gmail.com | |
* Date: 2014/8/12 | |
* Time: 16:33 | |
*/ | |
public class TestClassLoader extends org.apache.catalina.loader.WebappClassLoader { | |
public TestClassLoader(ClassLoader parent) { | |
this.setParentClassLoader(parent); |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
unzip3_gbk.py: Deal with zip files using encoding GB2312/GBK/GB18030 | |
""" | |
import os | |
# import sys | |
import argparse | |
import zipfile |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.