Recent articles

  • Shortcut for creating blank text file on MacOS

    August 15th, 2019macos

    Create A New Blank Text File In Any Folder On Your Mac

  • iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] – (macOS)

    January 8th, 2019consoleterminal

    How to install iTerm2 brew cask install iterm2 Or, if you do not have homebrew (you should ;)): Download and install iTerm2 iTerm2 has better color fidelity than the built in Terminal, so your themes will look better. Get the iTerm color settings Solarized Dark theme (patched version to fix the bright black value) Solarized […]

  • Enable https in Spring Boot

    August 20th, 2018springboothttps

  • Important issues for Jest

    August 8th, 2018jest
  • Download File via AJAX

    July 31st, 2018ajax

  • Use @semantic to release package to NPM and publish docs to gh-pages automatically

    May 6th, 2018npm
  • Package your React Component for distribution via NPM

    April 8th, 2018reactnpm

    1. MAKE A PACKAGE NPM PUBLISHABLE npm init In the package.json, make sure these fields are populated: package.json { “name”: “myUnflappableComponent”, “version”: “0.0.29”, “main”: “dist/index.js”, “publishConfig”: { “access”: “restricted” }, … } 2. DON’T BUNDLE REACT. USE THE PARENT’S REACT AND REACT-DOM. In package.json, add React and react-dom in the project’s peerDependencies (And remove it […]

  • AngularJS with TypeScript

    December 15th, 2017
  • Publishing Repo to Maven Centra

    November 9th, 2017maven

    Create an account on oss.sonatype.org Create an account and create an ISSUE about Repo. And waiting approved. Generate and share a PGP signature Installing GnuPG gpg –version Generating a Key Pair and Sharing Key gpg –generate-key gpg –list-keys –keyid-format short gpg –list-secret-keys –keyid-format short gpg –keyserver hkp://pool.sks-keyservers.net –send-keys // gpg –keyserver hkp://pool.sks-keyservers.net –recv-keys […]

  • MyISAM vs InnoDB

    November 8th, 2017mysqldatabase

    Similarities and differences for MySQL storage engines

  • Install Xvfb on CentOS

    October 9th, 2017xvfb

    Xvfb, or X virtual frame buffer is needed by selenium and chromedriver or gekodriver, so it can srun via cron with your PC locked, or without your script taking focus from the user section yum install xorg-x11-server-Xvfb Copy below to /etc/systemd/system/Xvfb.service [Unit] Description=X Virtual Frame Buffer Service After=network.target [Service] ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24 [Install] […]

  • Git Usage

    August 1st, 2017git

    This article includes frequent commands for Git. Like how to undo history, branch operations and so on...

  • AOP – Aspect-oriented programming

    July 9th, 2017aop

    It does so by adding additional behavior to existing code (an advice) without modifying the code itself, instead separately specifying which code is modified via a “pointcut” specification, such as “log all function calls when the function’s name begins with ‘set’”. This allows behaviors that are not central to the business logic (such as logging) […]

  • React/JSX Style Guide

    June 8th, 2017react

    A mostly reasonable approach to React and JSX This style guide is mostly based on the standards that are currently prevalent in JavaScript, although some conventions (i.e async/await or static class fields) may still be included or prohibited on a case-by-case basis. Currently, anything prior to stage 3 is not included nor recommended in this […]

  • AMD、CMD、UMD、CommonJS

    May 9th, 2017javascript

    AMD(Asynchromous Module Definition) Asynchronous Module Definition (AMD) has gained traction on the frontend, with RequireJS being the most popular implementation. Here’s module foo with a single dependency on jquery: // filename: foo.js define([‘jquery’], function ($) { // methods function myFunc(){}; // exposed public methods return myFunc; }); And a little more complicated example with multiple […]

  • API Design Guide

    April 9th, 2017api

    Use RESTful service URLs Under REST principles, a URL identifies a resource. The following URL design patterns are considered REST best practices: URLs should include nouns, not verbs. Use plural nouns only for consistency (no singular nouns). Use HTTP methods (HTTP/1.1) to operate on these resources: Use HTTP response status codes to represent the outcome […]

  • Build Spring Boot Starter Project

    February 9th, 2017springboot

    Two Java Files @ConfigurationProperties(prefix = “spring.ftsi”) public class IndexServiceAutoConfigurationProperties { } @Configuration @EnableConfigurationProperties(IndexServiceAutoConfigurationProperties.class) @ConditionalOnClass(IndexService.class) @ConditionalOnProperty(prefix = “spring.ftsi”, name = “enabled”, matchIfMissing = true) public class IndexServiceAutoConfiguration { @Autowired private IndexServiceAutoConfigurationProperties properties; @Bean @ConditionalOnMissingBean(IndexService.class) public IndexService indexService() throws ClassNotFoundException, IllegalAccessException, InstantiationException { IndexService service = new IndexService(); return service; } } File: /src/main/resources/META-INF/spring.factories org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ net.bndy.ftsi.starter.IndexServiceAutoConfiguration Usage […]

  • Error Handling in Spring Boot

    February 8th, 2017springboot
  • TimeZone in Spring Boot

    April 8th, 2016springboot

    @SpringBootApplication public class Application { @PostConstruct public void init(){ // Setting Spring Boot SetTimeZone TimeZone.setDefault(TimeZone.getTimeZone(“UTC”)); } public static void main(String[] args) { SpringApplication.run(Application.class, args); } } In application.properties spring.jackson.time-zone= # Time zone used when formatting dates. For instance, “America/Los_Angeles” or “GMT+10”.