Skip to content

Instantly share code, notes, and snippets.

View aruld's full-sized avatar
🎯
Focusing

Arul Dhesiaseelan aruld

🎯
Focusing
View GitHub Profile
@aruld
aruld / install.log
Created August 18, 2019 18:16
brew install certbot log on Amazon Linux 2
[ec2-user@mldev ~]$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
==> Installing Ruby to /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 26.9M 100 26.9M 0 0 11.9M 0 0:00:02 0:00:02 --:--:-- 15.4M
==> Installing successful
==> /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/current/bin/ruby
ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-linux]
==> Add Ruby to your PATH by running:
@aruld
aruld / # certbot - 2019-08-17_21-14-09.txt
Created August 17, 2019 21:28
certbot on 4.14.133-113.112.amzn2.x86_64 - Homebrew build logs
Homebrew build logs for certbot on 4.14.133-113.112.amzn2.x86_64
Build date: 2019-08-17 21:14:09
@aruld
aruld / RideProviderTest.java
Last active August 20, 2018 06:11
Example shows Local variables support for Lambda Parameters in Java 11
import org.jetbrains.annotations.NotNull;
import java.util.Comparator;
import java.util.function.ToLongFunction;
import java.util.stream.Stream;
public class RideProviderTest {
@FunctionalInterface
private interface RideProvider {
@aruld
aruld / RideTest.java
Created January 11, 2018 03:06
Local Variable Type involving lambda
import java.util.Comparator;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Stream;
public class RideTest {
interface RideProvider {
long getFareEstimate(String start_lat, String start_lng, String end_lat, String end_lng, String type);
}
@aruld
aruld / LocalVariableTypeInferenceTest.java
Created January 11, 2018 03:02
Local Variable Type Inference Examples
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*;
public class LocalVariableTypeInferenceTest {
private void processOrder(String order) {
@aruld
aruld / log4j.properties
Last active April 11, 2024 01:25
Must have Time and Size Log4J appender for your application http://aruld.info/must-have-time-and-size-log4j-appender-for-your-application/
log4j.rootLogger=DEBUG,rollingByDate
# logfile is set to be a TimeAndSizeRollingAppender. Keep 100 backup files before rotating and rolling daily, compression set to GZ
log4j.appender.rollingByDate=uk.org.simonsite.log4j.appender.TimeAndSizeRollingAppender
log4j.appender.rollingByDate.File=/logs/app.log
log4j.appender.rollingByDate.RollOnStartup=true
log4j.appender.rollingByDate.DateRollEnforced=true
log4j.appender.rollingByDate.Threshold=DEBUG
log4j.appender.rollingByDate.DatePattern=.yyyy-MM-dd
log4j.appender.rollingByDate.MaxFileSize=10MB
@aruld
aruld / Info.plist
Last active March 29, 2016 14:07
To run Intellij 14.1 with latest JDK 9 on OS X Yosemite, edit /Applications/IntelliJ\ IDEA\ 14.app/Contents/Info.plist and set JVMVersion to 1.8 under JVM Options.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
@aruld
aruld / NameClashTest.java
Last active August 29, 2015 14:17
Name Clash
public class NameClashTest {
interface I {
void foo(int x);
private I foo() {
return null;
}
private void foo(int x) {} // Invalid: method foo(int) is already defined in interface NameClashTest.I
}
@aruld
aruld / VisibilityTest.java
Created March 21, 2015 07:36
cannot reduce visibility of private methods
public class VisibilityTest {
interface I {
private void foo(int x) {}
private void bar(int x) {}
}
interface J extends I {
void foo(int x); // Valid: public abstract method with the same signature as a private method in super type is allowed.
default void bar(int x) {} // Valid: public default method with the same signature as a private method in super type is allowed.
}
public interface Api {
// constant declarations
int CAFEBABE = 0xCAFEBABE;
// abstract methods
void foo(int data);
void bar(int data);
// default methods