Skip to content

Instantly share code, notes, and snippets.

View jasoet's full-sized avatar
🎯
Focusing

Deny Prasetyo jasoet

🎯
Focusing
View GitHub Profile
@jasoet
jasoet / .zshrc
Created April 24, 2016 11:49
ZSH Aliases
export PATH=/home/jasoet/.app/:/home/jasoet/.app/activator-dist-1.3.9/bin:$PATH
alias gw="./gradlew"
alias dc="docker-compose"
alias dcs="docker-compose stop"
alias dcr="docker-compose rm -f"
alias dcps="docker-compose ps"
alias dcl="docker-compose logs"
alias dcu="docker-compose up -d"
alias dcb="docker-compose build"
@jasoet
jasoet / .eslintrc.js
Created May 11, 2016 01:03 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@jasoet
jasoet / locale.sh
Last active September 21, 2018 23:22
Set Locale on DigitalOcean Ubuntu (Remove Locale Error Message on console)
export LANGUAGE="en_US.UTF-8"
echo 'LANGUAGE="en_US.UTF-8"' >> /etc/default/locale
echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale
@jasoet
jasoet / InputStreamObservable.kt
Last active August 26, 2016 19:16
Extension Function for InputStream that convert it to Observable<String>
fun InputStream.toObservable(): Observable<String> {
class IOThread(private val inputStream: InputStream,
private val subscriber: Subscriber<in String>) : Thread() {
override fun run(): Unit {
Scanner(InputStreamReader(inputStream)).use {
while (it.hasNextLine()) {
subscriber.onNext(it.nextLine())
}
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import org.jasoet.util.lang.orNotFound
import org.jasoet.db.entity.FinancialData
import org.jasoet.db.entity.Grant
import org.jasoet.db.repository.FinancialDataRepository
import org.jasoet.repository.GrantRepository
import org.jasoet.db.repository.master.InstitutionRepository
@jasoet
jasoet / boostrap_xenial.sh
Last active October 18, 2016 20:57
Bootstrap Ubuntu Xenial
#!/bin/bash
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" >> /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y docker-engine
sudo service docker start
curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
@jasoet
jasoet / gist:052bef9dabc1f37fc553d67d714f9906
Created November 3, 2016 07:44 — forked from mplatvoet/gist:bd029656bd17412f02cd
CompletableFuture with Kovenant Promises example
import nl.komponents.kovenant.*
import nl.komponents.kovenant.jvm.asDispatcher
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ForkJoinPool
fun main(args: Array<String>) {
Kovenant.context {
// configure Kovenant with the same pool
// CompletableFutures use. By default it's
// the common pool.
@jasoet
jasoet / service_doc.md
Created February 20, 2018 03:28 — forked from madebyais/service_doc.md
Service documentation

{SERVICE_NAME}

[build_status_badge_if_any] [code_coverage_badge_if_any]

Replace this text with service detail description.

  • What is the purpose of this service ?
  • Background why this service is needed

FEATURES

@jasoet
jasoet / kube_cheat_sheet.md
Created March 9, 2018 03:02
Kubernetes Cheat Sheet
@jasoet
jasoet / kube_overview.md
Created March 9, 2018 03:04
Kubernetes Overview
approvers title
bgrant0607
hw-qiaolei
Overview of kubectl

kubectl is a command line interface for running commands against Kubernetes clusters. This overview covers kubectl syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the kubectl reference documentation. For installation instructions see installing kubectl.

Syntax