Skip to content

Instantly share code, notes, and snippets.

View taufiqibrahim's full-sized avatar

taufiqibrahim

View GitHub Profile
DockerAppHost DockerAppPort AppMessage
http://localhost 5001 Welcome to my app! I am running on http://localhost:5001
http://localhost 5002 Welcome to my app! I am running on http://localhost:5002
http://localhost 5003 Welcome to my app! I am running on http://localhost:5003
from django.db import models
class Container(models.Model):
container_host = models.URLField()
container_port = models.PositiveIntegerField()
container_default_message = models.CharField(
max_length=255
)
# ...
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'dockerman',
]
from django.contrib import admin
from dockerman.models import Container
@admin.register(Container)
class ContainerAdmin(admin.ModelAdmin):
list_display = ('container_host', 'container_port', 'container_default_message')

Move WSL2 from C to another drive

Run powershell.exe as Administrator

#Command
wsl -l -v

#Output example
PS C:\WINDOWS\system32> wsl -l -v
@taufiqibrahim
taufiqibrahim / order_billing_aggregate_rdbms.sql
Last active May 16, 2020 14:07
Apache Flink: SQL Client Walkthrough
SELECT
do_no,
SUM(amount) AS amount_agg,
SUM(selling_amount) AS selling_amount_agg,
SUM(discount_amount) AS discount_amount_agg
FROM order_billing
GROUP BY
do_no
@taufiqibrahim
taufiqibrahim / test.sql
Created May 16, 2020 14:20
Test Medium
SELECT * FROM table_name
SELECT * FROM my_table;
@taufiqibrahim
taufiqibrahim / mytopic-schema.json
Last active May 27, 2020 13:20
mytopic-schema.json
{
"type": "object",
"title": "MyTopic",
"properties": {
"o_id": {"type": ["number", "null"], "multipleOf": 1.0},
"o_sap_ts": {"type": ["string", "null"]},
"o_so_key": {"type": ["string", "null"]},
"o_ordertypecode": {"type": ["string", "null"]},
"o_salesorderno": {"type": ["string", "null"]},
"o_salesofficecode": {"type": ["string", "null"]},
@taufiqibrahim
taufiqibrahim / serverless_kafka_lambda-1-initialize-serverless-project.sh
Last active December 2, 2020 17:05
serverless_kafka_lambda-1-initialize-serverless-project.sh
# install serverless
npm install -g serverless
# creating serverless project
serverless create \
--template aws-python3 \
--name serverless-etl-sap-tms \
--path serverless-etl-sap-tms