Posts

Azure SAML App registration

Image
We can easily configure SAML app in Azure. Goto Enterprise Application ->  New Application. Then select "Create your own appllication". Provide a name and select "".  Click "create". After that you will be directed to the new app. Goto "Single sign on" and click on SAML.  And then click on "Edit" Provide the Identifer (a unique id) for your application.   Reply Url is the endpoint Entra will send the token to upon successful login.  Click on "Save".  You will be prompted to test this application. Click "Yes" to test the application.  So you will go through the standard process of signing into Entra - then you can see you will be redirected to http://lolcalhost:4000 with a SAML response. The SAML reponse is the token issued and you can validate that by using powerhell:- [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("YOUR_BASE64_STRING")) Next step, is to expose your REPLY URL ...

aws service control policies in organization - preventing user from creating s3 bucket in a region

Image
  For those coming from Azure, Aws account is a subscription. So in this walk-through we are going to create another new account called   with number xxxxxxxx . You would have another account which is the management account  ( yyyyyyyyyy ). SCP does not applies to the management yyyyyyyy account. Assuming you already have this AWS created and a user called "mark" who is tied to xxxxxx account.  Please note: The user from yyyyyy account are exempted To create your AWS service control policies, goto AWS Organization and then -> Policies -> Service Control Policies (please make sure you enable it)  Next, click on "Create policy" and add the following in the policy and click "create". { "Version": "2012-10-17", "Statement": [ { "Sid": "PreventS3CreationInApSoutheast1", "Effect": "Deny", "Action": [ "s3:CreateBucket" ], ...

affaan - everything claude code install opencode

Image
  Think everyone is execited about affaan's everything claude code. Let's setup this for opencode.  Please make sure you have nodejs installed. Then run the following command to get you setup  git clone https://github.com/affaan-m/ECC.git cd ECC npm install npm run build:opencode node scripts/ecc.js install --profile minimal --target opencode Next we will run opencode from command line, and you should be able to access your ecc here To start using follow this guide here https://github.com/affaan-m/ecc#start-using-ecc Some notes If you try to configure --profile to anything other than minimal, you will hit an issue and those instruction templates will not be installed. 

empero-ai/Qwen3.8-2B-Distill-GGUF Q4_K_M

Image
This is a good model and really fast too. Using the smaller size Q4_K_M and found out that it this version does not know how to call tool compare to its larger version empero-ai/Qwen3.8-4B-Distill-GGUF Switching to the Q_8 version aint any better. It still does not know how to call tools - the context given is way larger about 32k.  Then switching BF16 gives a context of 26.9k which is good but still unable to make any tool calling

ornith-ai/Ornith-1.0-9B-GGUF

Image
Loving this model, it is really good and able to do coding, perform web search and use edit tool to generate the necessary code. For example, if you ask it to write a hello world app in android, all these file are generated.  Really happy with it - it is fast and really usable. It does have a context of 11.5k for me which hopefully I can crank it up. 

unsloth studio - the output path or generated path when you enable code tool

The default path for unsloth studio path unsloth\studio\sandbox . For my case that will be :-  C:\Users\nzai\.unsloth\studio\sandbox\__LOCALID_ZQvj3Mq\android-app 

terraform tomap() requires some care when using it

Terraform tomap function requires the object to have the same schema otherwise it will give you the following error  │   on main.tf line 14, in resource "null_resource" "from_yaml_files": │   14:   for_each = tomap(local.yaml_data) │     ├──────────────── │     │ while calling tomap(v) │     │ local.yaml_data is object with 3 attributes │ │ Invalid value for "v" parameter: cannot convert object to map of any single type. Let's see what that looks like in yaml - if you're loading 3 files and all of them have the following - that's great! happy days. But if you have somehing that looks different  --- name : DisabledApp version : 0.5 enabled : false environment : development items :   - id : 1     type : test     name : test-service     port : 7000 different like this --- name : DisabledApp version : 0.5 enabled : false environment : development items :   - id : 1 ...

terraform working with for and for_each

terraform "for" is used for data transformation while for_each is used to create resource for_each  locals {   servers = {     "web-1" = { cpu = 2 }     "web-2" = { cpu = 4 }   } } resource "null_resource" "servers" {   for_each = local . servers   # Creates 2 resources   triggers = { cpu = each . value . cpu } } for loop usage can be seen here locals {   names = [ "alice" , "bob" , "charlie" ]     # Transform to uppercase (just data)   upper_names = [ for name in local . names : upper (name)]     # Create map (just data)   name_map = { for name in local . names : name => upper (name)}     # Filter (just data)   short_names = [ for name in local . names : name if length (name) < 5 ] } output "result" {   value = local . upper_names   # Just prints ["ALICE", "BOB", "CHARLIE"] } Both for_each and for can be used ...

vscode unable to resolve - openai.types.eval_create_params when package is already installed azure-ai-projects

Image
Bump into this error while trying to run my python code that requires some openai evaluation modules. from openai . types . evals . create_eval_jsonl_run_data_source_param import CreateEvalJSONLRunDataSourceParam , SourceFileID from openai . types . eval_create_params import DataSourceConfigCustom from azure . identity import DefaultAzureCredential from azure . ai . projects import AIProjectClient  Then when I checked my vscode python interpreter, I noticed that my setup wasn't quite right, I had to go back to my .venv folder and start up my vscode from there. Then it was able to resolve the python modules.

aws cloudwatch - log analytics options used to query logs

We can use multiple approach to query a logs in cloudwatch - log analytics. 1. Logs Insights QL (the native language)   Example of query would look similiar to this  SOURCE logGroups ( namePrefix : [], class : "STANDARD" ) START =- 3600s END = 0s | fields @timestamp , @message | filter @message like /Error/ | sort @timestamp desc | limit 10000 2. OpenSearch Structured Query Language (SQL)  For teams that prefer industry-standard database syntax, CloudWatch supports OpenSearch SQL. It is highly useful if you need to perform relational actions like JOIN commands across logs. SOURCE "arn:aws:logs:ap-southeast-2:042005083034:log-group:/aws/lambda/my-function" START =- 3600s END = 0s | SELECT status , COUNT ( * ) FROM log_group_name 3. OpenSearch Piped Processing Language (PPL) OpenSearch PPL is an alternative pipeline-based query language. It allows you to process data sequentially through a series of chained commands.  SOURCE "arn:aws:logs:a...