Skip to content

Instantly share code, notes, and snippets.

View sonique6784's full-sized avatar

sonique6784

View GitHub Profile
@sonique6784
sonique6784 / add-weight-app.md
Last active October 10, 2025 10:14
PROMPT: Watch app to add weight

Prompt: Watch app to add weight

I want to create a watch app where i can input my weight. this will help track my weight easily.

General Requirements

  • Weight can be in Kilogram or in pounds.
  • we need a health connect integration to read and write the weight, which is a "body measurement" using WeightRecord
  • The app will show a chart of weight evolution in the last 52 weeks

Detailed requirements

@sonique6784
sonique6784 / HelloWorldKt.md
Created October 19, 2024 09:57
Hello World Kotlin Native

When compiling with kotlinc-native compiler, the binary link with the system libraries such as libc++.

❯ ls -lh
total 1044
-rw-r--r--@ 1 sonique  staff    45B 19 Oct 20:43 helloworld.kt
-rwxr-xr-x@ 1 sonique  staff   1.0M 19 Oct 20:47 program.kexe
@sonique6784
sonique6784 / askgemini.py
Created February 15, 2024 09:37
A minimalist Gemini implementation for Terminal
#
# A minimalist Gemini implementation for Terminal
# Ask Gemini from the command line.
#
import sys
import os
import pathlib
import textwrap
import google.generativeai as genai
@sonique6784
sonique6784 / installAndConfigureMacOS.sh
Last active September 21, 2025 00:45
Install and Configure macOS
# Install homebrew - package manager
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# add home brew to the PATH
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
# Add cask for unstable version (alpha, beta, nighly)
brew tap homebrew/cask-versions
# Add cask for fonts
/* Copyright 2023 Cedric Ferry.
SPDX-License-Identifier: Apache-2.0 */
class MainActivity : ComponentActivity() {
// activity top level interception of the keyboard events
override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean {
val ctrl_w = KeyShortcut(KeyEvent.KEYCODE_W, ctrl = true)
val ctrl_r = KeyShortcut(KeyEvent.KEYCODE_R, ctrl = true)
@sonique6784
sonique6784 / GCoreAPIKeyLogin.sh
Last active July 14, 2023 23:35
Gcore labs authentication with API Permanent Token
#!/bin/bash
# Copyright 2023 Cedric Ferry.
# SPDX-License-Identifier: Apache-2.0
# Gcore labs authentication with API Permanent Token
# Make sure you set "APIKey" in the Authorization header
# Get your {TOKEN} here: https://accounts.gcore.com/profile/api-tokens
# Get your {id} here: https://cdn.gcore.com/resources/list
/**
* immersiveExperience for Android
* set your app into immersive mode hidding navigation and status bar
* call this function in Activity#onCreate
*/
private fun immersiveExperience() {
val windowInsetsController =
WindowCompat.getInsetsController(window, window.decorView)
// Configure the behavior of the hidden system bars.
windowInsetsController.systemBarsBehavior =
/* Copyright 2023 Cedric Ferry.
SPDX-License-Identifier: Apache-2.0 */
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.gestures.detectDragGestures
import androidx.compose.foundation.layout.Box
/* Copyright 2023 Cedric Ferry.
SPDX-License-Identifier: Apache-2.0 */
import android.view.Window
import androidx.core.view.ViewCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
@sonique6784
sonique6784 / vimrc.vim
Created February 21, 2023 23:06
vimrc
set backspace=2 " allow backspacing over everything in insert mode
set history=50 " keep 50 lines of command line history
set ignorecase " search commands are case-insensitive
set incsearch " while typing a search command, show matches incrementally
" instead of waiting for you to press enter
set ruler " show the cursor position all the time
set viminfo='20,\"50 " read/write a .viminfo file, don't store more than 50 lines of registers
set encoding=utf8 " non-ascii characters are encoded with UTF-8 by default
set formatoptions=croq " c=autowrap comments, r=continue comment on <enter>,