CSS – Design for developers

https://github.com/sdras/design-for-developers

Advertisements
Posted in CSS, Programming | Leave a comment

CSS – Grid examples

https://gridbyexample.com/

https://labs.jensimmons.com/

https://cssgridgarden.com/

https://codepen.io/

Posted in CSS, Programming | Leave a comment

CSS – CSS Flex and Grid

CSS Flex and Grid examples.
https://github.com/jen4web/fluent2018

CSS definition guide.
https://estelle.github.io/

Posted in CSS | Leave a comment

Highly scalable/available distributed system whiling maintaining integrity

I think that ACID is a main mechanism to maintain the application consistency but it’s hard to make it highly scalable and available system because of synchronous property of ACID. But if we can relax the timeliness property in consistency, I think that it is possible highly scalable/available system by using a log based message system such as Kafka.
The main reason is that log based messaging system can guarantee the serializability of events, we can maintain the integrity of application by processing the fault tolerant events eventually.

The option possible option is to use the optimistic locking mechanism which FoundataionDB is applying with.

Posted in kafka, Programming | Leave a comment

Java – Spring unit test with custom provided configuration.

The following example will show how to define the custom Spring configuration for unit test with @ContextConfiguration annotation.
Full example can be found the below github.

https://github.com/nsclass/java-timezone/blob/master/src/test/java/com/ns/timezone/javatimezone/JavaTimezoneServiceApplicationTests.java

@RunWith(SpringRunner.class)
@SpringBootTest
@ContextConfiguration(classes = JavaTimezoneServiceApplicationTests.AppConfig.class)
public class JavaTimezoneServiceApplicationTests
{
	@Configuration
	static class AppConfig
	{
		@Bean
		TimezoneService timezoneService() {
			return new TimezoneService();
		}
	}

	@Autowired
	private TimezoneService timezoneService;

	@Test
	public void verifyGetAllTimezoneDisplay() {
		Flux<TimezoneService.TimezoneDisplayInfo> timezones = timezoneService.getAllTimezoneDisplay();
		int count = timezones.collectList().block().size();
		Assert.assertEquals(627, count);
	}

}
Posted in Java, Programming | 3 Comments

JVM – Profiling and GC analysis tool

The easiest GC log analysis web site.
https://gceasy.io/

Profiling
Adding a JVM Option +XX:+PreserveFramePointer

https://github.com/jvm-profiling-tools/perf-map-agent
https://github.com/brendangregg/FlameGraph

$ perf-java-flames [pid]

https://github.com/Netflix/flamescope

Posted in Java, Programming | Leave a comment

Simple way to generate ssh pub/private key

Very simple way to generate ssh pub/private key in Linux.


$ ssh-keygen -t rsa -P ""


Copy the content of .ssh/id_rsa.pub to .ssh/authorized_keys

Posted in Programming | Leave a comment