Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
sw-samuraj / junit5-jacoco-build.gradle
Last active July 2, 2018 04:38
A minimalistic Gradle configuration for JaCoCo with JUnit 5.
apply plugin: 'jacoco'
jacoco {
toolVersion = '0.7.9'
applyTo junitPlatformTest
}
jacocoTestReport {
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
@ManueGE
ManueGE / ImagePicker+TOCropViewController.swift
Last active November 6, 2018 20:44
ImagePicker+TOCropViewController
//
// ImagePicker.swift
// manueGE
//
// Created by Manuel García-Estañ on 7/11/16.
// Copyright © 2016 ManueGE. All rights reserved.
//
import Foundation
import UIKit
@mlaccetti
mlaccetti / DefaultTrustManager.java
Created April 28, 2015 12:48
Trusting Wildcards for Guggle
package laccetti.server.security;
import lombok.extern.slf4j.Slf4j;
import org.jsslutils.sslcontext.X509TrustManagerWrapper;
import javax.net.ssl.X509TrustManager;
import java.security.GeneralSecurityException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
@juanbrujo
juanbrujo / fullCalendarDisablePrevNext.js
Last active November 16, 2020 07:35
jQuery FullCalendar.js: disable prev/next button for past/future dates
$('#calendar').fullCalendar({
viewRender: function(currentView){
var minDate = moment(),
maxDate = moment().add(2,'weeks');
// Past
if (minDate >= currentView.start && minDate <= currentView.end) {
$(".fc-prev-button").prop('disabled', true);
$(".fc-prev-button").addClass('fc-state-disabled');
}
else {