Skip to content

Instantly share code, notes, and snippets.

View cbuckowitz's full-sized avatar

Christian Buckowitz cbuckowitz

View GitHub Profile
@cbuckowitz
cbuckowitz / README.md
Last active July 6, 2021 15:46
templating #helm #chart values

Use the helm --show-only parameter to generate the helm chart values.yaml from a helm template.

templates/values.yaml

secrets:
  password: {{ randAlphaNum 10 | b64enc | quote }}
@cbuckowitz
cbuckowitz / README.md
Last active January 21, 2024 21:17
Change Storage Location for Docker Desktop with WSL2 #DockerDesktop #WSL2

Change the Storage Location for Docker Desktop with WSL2

Docker Desktop stores docker data in 2 distros

  • docker-desktop
  • docker-desktop-data

These distros are installed on the system drive by default.

To move them to another drive, these distros can be exported, deleted and imported from the new location.

@cbuckowitz
cbuckowitz / snippet.abap
Created April 8, 2020 09:28
#ABAP inline date computation in parameter assignment
cl_abap_unit_assert=>assert_true( f_cut->check_werk_aktiv( iv_werks = lv_werks iv_keydate = lv_datum ) ).
cl_abap_unit_assert=>assert_true( f_cut->check_werk_aktiv( iv_werks = lv_werks iv_keydate = CONV d( lv_datum + 1 ) ) ).
cl_abap_unit_assert=>assert_true( f_cut->check_werk_aktiv( iv_werks = lv_werks iv_keydate = CONV d( lv_datum + 456 ) ) ).
cl_abap_unit_assert=>assert_false( f_cut->check_werk_aktiv( iv_werks = lv_werks iv_keydate = CONV d( lv_datum - 1 ) ) ).
cl_abap_unit_assert=>assert_false( f_cut->check_werk_aktiv( iv_werks = lv_werks iv_keydate = CONV d( lv_datum - 789 ) ) ).
@cbuckowitz
cbuckowitz / snippet.abap
Created April 7, 2020 08:37
ABAP Range Table VALUE
VALUE #( ( sign = 'I' option = 'EQ' low = 'somevalueortakeavar' ) )
@cbuckowitz
cbuckowitz / IntArray2ByteArray.kt
Created October 11, 2019 20:05
Convert Kotlin IntArray to ByteArray
val ints = intArrayOf(1,2,3)
val bytes = ints.map { it.toByte() }.toByteArray()
@cbuckowitz
cbuckowitz / debug.txt
Created September 25, 2019 09:51
SAPGUI Debug Script
[Function]
Command=/H
Type=SystemCommand
@cbuckowitz
cbuckowitz / CreateSHA1.abap
Created December 8, 2017 18:08
Create hash from single value #SAP #ABAP
DATA lo_digest TYPE Ref To cl_abap_message_digest.
DATA lv_timestamp TYPE timestampl.
DATA lv_hash_string TYPE string.
DATA lv_hash_base64 TYPE string.
* prepare test data
GET TIME STAMP FIELD lv_timestamp.
@cbuckowitz
cbuckowitz / CreateCombinedSHA1.abap
Last active May 18, 2022 02:34
Create hash from multiple values #SAP #ABAP
DATA lo_digest TYPE Ref To cl_abap_message_digest.
DATA lv_timestamp TYPE timestampl.
DATA lv_int TYPE int4.
DATA lv_text TYPE string.
DATA lv_hash_string TYPE string.
DATA lv_hash_base64 TYPE string.
@cbuckowitz
cbuckowitz / FPM_MessageBox.abap
Last active November 29, 2017 16:58
How to show a simple message / confirmation box in a SAP FPM application #SAP #ABAP #FPM
METHOD if_fpm_guibb_form_ext~needs_confirmation.
CASE io_event->mv_event_id.
WHEN io_event->gc_event_send. "filter the FPM event to show the message box for
CREATE OBJECT eo_confirmation_request "the framework will render this as message box
EXPORTING
iv_window_title = |Title for the message box window|
it_confirmation_text = VALUE #(
@cbuckowitz
cbuckowitz / README.md
Last active December 8, 2017 19:41
create UUID #SAP #ABAP

Class CL_UUID_FACTORY is referenced in the sap standard documentation to create uuid's.