Skip to content

Instantly share code, notes, and snippets.

View cmin764's full-sized avatar
🗺️
Do. Or do not. There is no try.

Cosmin Poieana cmin764

🗺️
Do. Or do not. There is no try.
View GitHub Profile
@cmin764
cmin764 / wandercode-expense-claim.txt
Created March 11, 2025 18:53
Eligible expenses for Wandercode LTD
Salaries or hourly wages paid to software engineers for their work.
Bonuses and overtime pay.
Fees paid to external software engineering consultants for their expertise or services.
The cost of software development tools and platforms (e.g., integrated development environments (IDEs), version control systems, build tools).
Licensing fees for software libraries, frameworks, or APIs that are used in development.
Computers, servers, or other devices necessary for software development. (This can be capitalise depending upon the spent amount generally we do capitalise the same if it exceeds 10k HKD)
Any peripherals (monitors, keyboards, etc.) or networking equipment used in development.
Charges for cloud infrastructure, hosting services, or virtual machines used in development, testing, or deployment.
Database services (e.g., Amazon RDS, Azure SQL Database).
Cost of professional development, courses, or certifications related to software engineering.
@cmin764
cmin764 / stateful-rounding.py
Created February 27, 2025 08:59
Round values (up/down) while minimizing the aggregated remainder error
import math
class StatefulRounding:
def __init__(self):
self.error = 0.0 # Tracks accumulated rounding error
def round(self, value):
"""
Round a value dynamically based on the accumulated error.
- Uses floor/ceil to bring total error closer to zero.
@cmin764
cmin764 / bitbucket-whitelist-ips.txt
Created February 21, 2025 14:03
Bitbucket pipeline AWS IPs to whitelist
18.34.0.0/19
16.15.192.0/18
54.231.0.0/16
52.216.0.0/15
3.5.76.0/22
18.34.244.0/22
18.34.48.0/20
18.34.232.0/21
3.5.80.0/21
16.15.176.0/20
@cmin764
cmin764 / loom-intros
Created February 19, 2025 10:43
Cosmin Poieana - Intro looms (Garden3d)
Part 1: https://www.loom.com/share/63d3dcb39153499e81a8252dbb99e810?sid=39689f09-8bbd-4837-b7ae-bc3a4dc3cd8d
Part 2: https://www.loom.com/share/9cc4d16648344f769e58b5e1bb6d9bac?sid=59621a3f-34da-4b0f-90c6-07a97e23603f
Part 3: https://www.loom.com/share/df4c4a1b17db4688998a47a007af8b71?sid=9f7155f8-869a-42e1-8ced-66d201c148ac
@cmin764
cmin764 / async-redis-cache.py
Created February 13, 2025 17:11
Async Redis caching (with cluster mode support)
import os
from redis.asyncio import Redis, RedisCluster
from servicelib.logging import get_our_logger
logger = get_our_logger(__name__)
class RedisCache:
#!/bin/bash
osascript -e 'on run
try
set volumeList to list disks
end try
set setupVolume to ""
try
repeat with vol in volumeList
if vol contains "WeChat" then
set setupVolume to vol
@cmin764
cmin764 / git-reset-history
Created June 25, 2024 07:45
Cleanup entire repo history
Clone the Repository
If you haven't already, clone the repository to your local machine:
bash
Copy code
git clone https://github.com/username/repository.git
cd repository
Check Out the Master Branch
Ensure you are on the master branch and have the latest changes:
@cmin764
cmin764 / windows-vscode-run-no-internet
Created December 15, 2023 12:58
No internet access VSCode automation run
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS Z:\Repos\Portal\example-windows-calc-notepad> & 'C:\Users\cmin\AppData\Local\robocorp\temp\fcda250b518ee165\rf-ls-run\run_env_00_h4967sxm.bat' 'c:\Users\cmin\.vscode\extensions\robocorp.robocorp-code-1.10.0\bin\rcc.exe' 'task' 'run' '--robot' 'z:\Repos\Portal\example-windows-calc-notepad\robot.yaml' '--space' 'vscode-09' '--workspace' 'd6b65aa4-0c45-4fd7-8bec-d68a29896e78' '--account' 'robocorp-code' '--task' 'Compute Numbers' '--controller' 'RobocorpCode'
"z:\\Repos\\Portal\\example-windows-calc-notepad\\robot.yaml" as robot.yaml is:
# For more details on the format and content:
# https://github.com/robocorp/rcc/blob/master/docs/recipes.md#what-is-in-robotyaml
@cmin764
cmin764 / response.json
Last active November 23, 2023 09:16
OpenWeather `/data/2.5/weather` response sample
{
"coord": {
"lon": 115.264,
"lat": -8.5081
},
"weather": [
{
"id": 804,
"main": "Clouds",
"description": "overcast clouds",
@cmin764
cmin764 / openapi-errors.txt
Created October 17, 2023 15:06
openapi-python-client generate --url https://robocorp.com/api/openapi.json
Error(s) encountered while generating, client was not created
Failed to parse OpenAPI document
55 validation errors for OpenAPI
paths./workspaces/{workspace_id}/workers/{worker_id}.delete.responses.200.Response.content.application/json.schema.Reference.$ref
Field required [type=missing, input_value={'type': 'object', 'requi...lean', 'enum': [True]}}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.4/v/missing
paths./workspaces/{workspace_id}/workers/{worker_id}.delete.responses.200.Response.content.application/json.schema.Schema.properties.deleted.Reference.$ref
Field required [type=missing, input_value={'type': 'boolean', 'enum': [True]}, input_type=dict]