This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change annotation location to Download folder | |
defaults write com.apple.screencapture location ~/Downloads/ | |
killall SystemUIServer | |
# Disable blocking unidentified developer | |
sudo spctl --master-disable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} }, | |
{ "keys": ["super+y"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} }, | |
{ "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}}, | |
{ "keys": ["super+d"], "command": "duplicate_line" }, | |
{ "keys": ["super+e"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} } | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.http.scaladsl.model.HttpRequest | |
import akka.http.scaladsl.server.Directives._ | |
import akka.http.scaladsl.unmarshalling.FromRequestUnmarshaller | |
import akka.stream.Materializer | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.voi.dto.response.HealthCheck | |
import com.voi.micro.services.ImplicitPojoMarshaller | |
import scala.concurrent.duration._ | |
import scala.concurrent.{ExecutionContext, Future} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.http.scaladsl.marshalling.{Marshaller, ToEntityMarshaller} | |
import akka.http.scaladsl.model.{ContentTypes, HttpEntity} | |
import akka.http.scaladsl.server.Directives._ | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.voi.dto.response.HealthCheck | |
trait HealthCheckEndpoint { | |
val mapper = new ObjectMapper() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global merge.tool kdiff3 | |
git config --global mergetool.kdiff3.path /Applications/kdiff3.app/Contents/MacOS/kdiff3 | |
git config --global core.editor "atom --wait" | |
or | |
git config --global core.editor nano | |
git config --global push.default simple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# check for where the latest version of IDEA is installed | |
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1` | |
wd=`pwd` | |
# were we given a directory? | |
if [ -d "$1" ]; then | |
# echo "checking for things in the working dir given" | |
wd=`ls -1d "$1" | head -n1` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val accessTokenReads = ( | |
(__ \ "token").read[String] and | |
(__ \ "createdDate").read[LocalDateTime] and | |
(__ \ "expiredDate").read[LocalDateTime] and | |
(__ \ "expired").read[Boolean] | |
) (AccessToken.apply _) | |
val accessTokenWrites = ( | |
(__ \ "token").write[String] and | |
(__ \ "createdDate").write[LocalDateTime] and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val uuidReads = Reads[UUID](i => i match { | |
case s: JsString => { | |
JsSuccess(UUID.fromString(s.value)) | |
} | |
case _ => { | |
JsError("error") | |
} | |
}) | |
val uuidWrites = Writes[UUID](i => JsString(i.toString)) | |
implicit val uuidFormat: Format[UUID] = Format(uuidReads, uuidWrites) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ho.lp; | |
import java.util.Scanner; | |
/** | |
* Created by hoangong on 24/12/2015. | |
*/ | |
public class Main { | |
private String input; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by hoangong on 23/12/2015. | |
*/ | |
public class LinkedList { | |
private Node head; | |
private Node tail; | |
private int count; | |
public Node getHead() { |