Skip to content

Instantly share code, notes, and snippets.

View cmltaWt0's full-sized avatar
🏠
Rustify

Max Sokolski cmltaWt0

🏠
Rustify
  • Raccoon Gang
  • Ukraine, Kharkiv
View GitHub Profile
@cmltaWt0
cmltaWt0 / tutor.yaml
Created June 7, 2024 12:14
tutor.yaml
API_HOST_URL: "{{ "https" if ENABLE_HTTPS else "http" }}://{{ LMS_HOST }}"
ENVIRONMENT_DISPLAY_NAME: "tutor"
PLATFORM_NAME: "{{ PLATFORM_NAME }}"
FEEDBACK_EMAIL_ADDRESS: "{{ CONTACT_EMAIL }}"
OAUTH_CLIENT_ID: "android"
APPLICATION_ID: 'org.openedx.app'
URI_SCHEME: ''
FAQ_URL: ''
> [build 4/4] RUN ./gradlew assembleProdDebug:
2.186 Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
12.59 > Task :buildSrc:compileJava NO-SOURCE
12.78 > Task :buildSrc:compileGroovy UP-TO-DATE
12.79 > Task :buildSrc:processResources NO-SOURCE
12.79 > Task :buildSrc:classes UP-TO-DATE
12.89 > Task :buildSrc:jar UP-TO-DATE
17.58
17.59 > Configure project :
17.59 Configurations are missing at config_settings.yaml
@cmltaWt0
cmltaWt0 / celeryworker-hpa.yaml
Created May 14, 2024 17:34
Open edx k8s helm
{{- $root := . -}}
{{- range $w := .Values.edxapp.celeryworkers.EDXAPP_CELERY_WORKERS }}
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: {{ include "edx-base.fullname" $root }}-{{ $w.service_variant }}-{{ $w.queue | replace "_" "-" }}-scaledobject
namespace: {{ $.Release.Namespace }}
spec:
@cmltaWt0
cmltaWt0 / values.yaml
Created May 14, 2024 17:31
Open edx k8s helm
celeryworkers:
replicaCount: 1
maxReplicaCount: 150
maxMessageRate: 40
resources:
requests:
cpu: 150m
memory: 400Mi
limits:
cpu: 950m
{{- $root := . -}}
{{- range $w := .Values.edxapp.celeryworkers.EDXAPP_CELERY_WORKERS }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "edx-base.fullname" $root }}-{{ $w.service_variant }}-{{ $w.queue | replace "_" "-" }}
labels:
{{ include "edx-base.labels" $root | indent 4 }}
packages:
- "app/*"
- "linked_modules/*"
@cmltaWt0
cmltaWt0 / build-android
Created May 22, 2023 16:19
Build Android
* Exception is:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':OpenEdXMobile:compileProdDebuggableJavaWithJavac'.
at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:71)
at org.gradle.execution.plan.TaskDependencyResolver.resolveDependenciesFor(TaskDependencyResolver.java:46)
at org.gradle.execution.plan.LocalTaskNode.getDependencies(LocalTaskNode.java:161)
at org.gradle.execution.plan.LocalTaskNode.resolveDependencies(LocalTaskNode.java:129)
at org.gradle.execution.plan.DefaultExecutionPlan.doAddNodes(DefaultExecutionPlan.java:186)
at org.gradle.execution.plan.DefaultExecutionPlan.addEntryTasks(DefaultExecutionPlan.java:150)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.addEntryTasks(DefaultTaskExecutionGraph.java:146)
at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(Task
@cmltaWt0
cmltaWt0 / edx-app-android
Created May 10, 2023 07:42
edx-app-android Palm fail
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.edx.mobile, PID: 17189
java.lang.NullPointerException: baseUrl == null
at java.util.Objects.requireNonNull(Objects.java:245)
at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:505)
at org.edx.mobile.http.provider.RetrofitProvider$Impl.get(RetrofitProvider.java:80)
at org.edx.mobile.http.provider.RetrofitProvider$Impl.getIAPAuth(RetrofitProvider.java:71)
at org.edx.mobile.inapppurchases.InAppPurchasesService$Provider.get(InAppPurchasesService.kt:28)
at org.edx.mobile.inapppurchases.InAppPurchasesService_Provider_GetFactory.proxyGet(InAppPurchasesService_Provider_GetFactory.java:42)
at org.edx.mobile.base.DaggerMainApplication_HiltComponents_SingletonC$SwitchingProvider.get(DaggerMainApplication_HiltComponents_SingletonC.java:2406)
@cmltaWt0
cmltaWt0 / course-authoring-dev-build.txt
Created May 4, 2023 09:27
course-authoring-dev tutor build
tutor images build course-authoring-dev
Building image docker.io/overhangio/openedx-course-authoring-dev:16.0.0
docker buildx build --tag=docker.io/overhangio/openedx-course-authoring-dev:16.0.0 --load --target=course-authoring-dev --cache-from=type=registry,ref=docker.io/overhangio/openedx-course-authoring-dev:16.0.0-cache /Users/cmltawt0/code/cc/btr/palm/root/env/plugins/mfe/build/mfe
[+] Building 30.5s (21/23)
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile
@cmltaWt0
cmltaWt0 / production.py
Created June 20, 2022 08:19
Adding SESSION_CACHE_ALIAS openedx
...
# Add cache alias for fix session disappearance
SESSION_CACHE_ALIAS = ENV_TOKENS.get('SESSION_CACHE_ALIAS', 'default')
...