Skip to content

Instantly share code, notes, and snippets.

View nerkarso's full-sized avatar
🔥
My passion is to solve problems using technology

Ner Karso nerkarso

🔥
My passion is to solve problems using technology
View GitHub Profile
@nerkarso
nerkarso / codeswing.json
Last active April 15, 2025 00:19
JS animated counter
{
"scripts": []
}
@nerkarso
nerkarso / codeswing.json
Last active April 15, 2025 00:10
HTML audio visualizer
{
"scripts": [],
"styles": []
}
@nerkarso
nerkarso / main.ts
Created April 14, 2025 23:44
TS try catch handler
export async function tryCatch<V>(promise: Promise<V>): Promise<[V | null, Error | null]> {
try {
const value = await promise;
return [value, null];
} catch (error) {
return [null, error instanceof Error ? error : new Error(String(error))];
}
}
@nerkarso
nerkarso / main.py
Last active January 14, 2025 22:48
Python API Request
import http.client
import json
class Logger:
def __init__(self):
self.api_domain = 'pocketbase.example'
self.api_endpoint = '/api/collections/recipients/records'
def create(self, phone_number, sent):
@nerkarso
nerkarso / codeswing.json
Last active October 21, 2024 14:07
CSS image context drop shadow
{
"scripts": [],
"styles": []
}
@nerkarso
nerkarso / index.js
Last active October 8, 2024 00:56
Firebase get access token
/**
* USAGE:
* export GOOGLE_APPLICATION_CREDENTIALS="./google-services.json"
* node index.js
*/
const admin = require("firebase-admin"); // ^11.0.1
export const getAccessToken = () => {
return admin.credential
@nerkarso
nerkarso / codeswing.json
Last active March 26, 2025 22:53
JS async await handler
{
"scripts": [],
"showConsole": true
}
@nerkarso
nerkarso / codeswing.json
Last active September 15, 2024 18:03
CSS display transition
{
"scripts": [],
"styles": []
}
@nerkarso
nerkarso / codeswing.json
Last active September 15, 2024 17:47
CSS better gradient
{
"scripts": [],
"styles": []
}
@nerkarso
nerkarso / codeswing.json
Last active September 15, 2024 17:40
CSS box decoration
{
"scripts": [],
"styles": []
}