Skip to content

Instantly share code, notes, and snippets.

View restuu's full-sized avatar

restuu restuu

View GitHub Profile
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
<configuration>
<property name="LOGS" value="./logs" />
<property name="LOG_FILENAME" value="app" />
<appender
name="Console"
class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
<jsonGeneratorDecorator class="net.logstash.logback.decorate.PrettyPrintingJsonGeneratorDecorator"/>
<providers>
<configuration>
<property name="LOGS" value="./logs" />
<property name="LOG_FILENAME" value="app" />
<appender name="Console"
class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%black(%d{ISO8601, Asia/Jakarta}) [%X{LOG_KEY}] %highlight(%-5level) [%blue(%t)] %yellow(%logger{25}): %msg%n%rEx
</Pattern>
@restuu
restuu / git_config.ps1
Created November 17, 2021 07:59
Powershell loop directories and set git config
$current_directory=Get-Location
Write-Host "Current directory: $current_directory"
Get-ChildItem | ForEach-Object -Process {
$is_folder = Test-Path -Path $_ -PathType Container
if (!$is_folder) {
# skip to next loop
return
@restuu
restuu / upgrade_go.sh
Last active December 5, 2020 01:50
Install Golang version
#!/bin/bash
# e.g 1.15.4
# ./upgrade_go.sh 1.15.4
version=$1
if [ "$version" == "" ]; then
echo "invalid version"
exit 1
fi
alias gcl="git clone"
alias gcm="git commit"
alias gps="git push"
alias gpl="git pull"
alias gck="git checkout"
alias gst="git status"
alias src="source"
alias srczsh="source ~/.zshrc"

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info

@restuu
restuu / .eslintrc
Created April 24, 2020 04:52
typescript eslint config
{
"env": {
"node": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
@restuu
restuu / .prettierrc
Created April 24, 2020 04:49
prettier config
{
"singleQuote": true,
"printWidth": 120,
"trailingComma": "all"
}
@restuu
restuu / tsconfig.json
Created April 24, 2020 04:47
tsconfig
{
"compilerOptions": {
"lib": ["es6", "es2016", "es2016.array.include", "es2017", "dom"],
"module": "commonjs",
"noImplicitReturns": true,
"sourceMap": true,
"target": "es2017",
"esModuleInterop": true,
"strictNullChecks": true,
"isolatedModules": true,