Skip to content

Instantly share code, notes, and snippets.

View natserract's full-sized avatar

Alfin S. natserract

View GitHub Profile
@natserract
natserract / contact.json
Created April 14, 2026 09:05
Contact Field
{
"contactID": {
"type": "string",
"value": "230846276"
},
"contactKey": {
"type": "string",
"value": " .nj.m .jk"
},
"contactTypeID": 0,
@natserract
natserract / call_logs_4.json
Created July 29, 2025 06:48 — forked from alfinevelop/call_logs_4.json
Error Breakpoint
{
"id": "175e8801-6eba-4060-ad9d-141469a98db3",
"assistantId": "d998893e-704d-48d8-b02e-4b117704e8d8",
"type": "webCall",
"startedAt": "2025-06-17T11:42:56.673Z",
"endedAt": "2025-06-17T11:44:54.862Z",
"transcript": "AI: Thank you for calling Wellness Partners. This is Riley, your virtual assistant. How may I help you? Today?\nUser: Please check my order status.\nAI: Sure. I'd be happy to help with that. Could you please provide your order number and ZIP code?\nUser: The order number is e r e 1 2 3, and the ZIP code 9 0 1 2 0.\nAI: Thank you for providing the details.\nAI: I will now check the status of your order. Please hold on for a moment. Executing user input to proceed with the provided information. Hold on a sec. It seems there was an issue\nAI: retrieving, uh, your order status. Uh, could you please verify the order number and ZIP code to ensure they're correct? Let's try again with the confirm details.\nUser: Yes. The order number is a r b 1 2 3. And the ZIP code 9 0 1 2 0.\nAI: Give me a
{
"id": "nokia-022",
"question": "How to extend battery life on Nokia 8?",
"answer": "Use features like adaptive brightness, close background apps, and enable Battery saver under Settings > Battery."
}
@natserract
natserract / update-golang.sh
Created April 3, 2025 08:01 — forked from theaog/update-golang.sh
update-golang.sh
#!/usr/bin/env bash
set -e
tmp=$(mktemp -d)
pushd "$tmp" || exit 1
function cleanup {
popd || exit 1
rm -rf "$tmp"
}
{
"results": [
{
"_id": "6677dc2133fec50010de26fb",
"SaaS": {
"autoRenew": true
},
"cleaningStatus": {
"value": "dirty",
"updatedBy": "Guesty automation",
@natserract
natserract / index.js
Created October 14, 2024 05:31
Print hello in JavaScript
// static payload:
s="";for(let i=0;i<4**7;++i)Reflect.defineProperty(self,[...i.toString(4)].map(n=>"ᅟᅠㅤᅠ"[n]).join(""),{get(){i?s+=String.fromCharCode(i>>7,i&127):eval(s)}})
// invisible code below:
ᅠᅟᅠᅠㅤᅠᅠ
ᅠᅠᅠᅠᅠᅟᅠ
ᅠᅠᅠᅠㅤᅠᅟ
ᅠᅟㅤㅤㅤᅠㅤ
ᅠᅠㅤᅠㅤᅠᅠ
ᅠᅟᅠㅤㅤㅤᅟ
ᅠᅟᅠᅠᅟㅤᅟ
@natserract
natserract / prompt.txt
Created July 30, 2024 10:33
Full prompt
User Profile:
<user_profile>
Name: Ahfas
Date of Birth: 1998-09-27
</user_profile>
Recommended Theraphy:
<recommended_theraphy>
- Name: 'Cognitive Behavioral Therapy (CBT)'
- ID: 'e81f912c-5488-4e83-99fe-c26a3230087d'
@natserract
natserract / flake.nix
Created July 1, 2024 12:16
Hack hack
{
description = "Nix configuration for X";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs-unstable";
@natserract
natserract / ci-pnpm-install.md
Created June 8, 2024 03:08 — forked from belgattitude/ci-pnpm-install.md
Composite github action to improve CI time with pnpm

Why

Although @setup/node as a built-in cache option, it lacks an opportunity regarding cache persistence. Depending on usage, the action below might give you faster installs and potentially reduce carbon emissions (♻️🌳❤️).

Requirements

pnpm v7 or v8 (not using pnpm ? see the corresponding yarn action gist)

Bench

@natserract
natserract / routes.go
Created May 16, 2024 03:42
Handle stream gin go
func waitForStream(c *gin.Context, ch chan interface{}) {
c.Header("Content-Type", "application/json")
for resp := range ch {
switch r := resp.(type) {
case api.ProgressResponse:
if r.Status == "success" {
c.JSON(http.StatusOK, r)
return
}
case gin.H: