Skip to content

Instantly share code, notes, and snippets.

@PostPCEra
PostPCEra / .py
Created March 17, 2025 20:10 — forked from Madhav-MKNC/coding-agent.py
All the code you need to create a powerful agent that can create and edit any file on your computer using the new text_editor tool in the Anthropic API.
import anthropic
import os
import sys
from termcolor import colored
from dotenv import load_dotenv
class ClaudeAgent:
def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000):
"""Initialize the Claude agent with API key and model."""
@PostPCEra
PostPCEra / agent loop
Created March 10, 2025 17:19 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
# Source: https://gist.github.com/vfarcic/c49bd483d350187c9afdf7a6f646ef7b
##################################################
# Mastering Kubernetes: Dive into Workloads APIs #
##################################################
# Additional Info:
# - Kubernetes: https://kubernetes.io
# - N/A
@PostPCEra
PostPCEra / task.sh
Created April 15, 2024 17:58 — forked from vfarcic/task.sh
# Source: https://gist.github.com/vfarcic/77c63cede031951654d5fea5ce0acb43
#########################################################################################
# Say Goodbye to Makefile - Use Taskfile to Manage Tasks in CI/CD Pipelines and Locally #
#########################################################################################
# Additional Info:
# - Task: https://taskfile.dev
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM
@PostPCEra
PostPCEra / task.sh
Created April 15, 2024 17:58 — forked from vfarcic/task.sh
# Source: https://gist.github.com/vfarcic/77c63cede031951654d5fea5ce0acb43
#########################################################################################
# Say Goodbye to Makefile - Use Taskfile to Manage Tasks in CI/CD Pipelines and Locally #
#########################################################################################
# Additional Info:
# - Task: https://taskfile.dev
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@PostPCEra
PostPCEra / postgres-cheatsheet.md
Created February 20, 2023 02:03 — forked from philippetedajo/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@PostPCEra
PostPCEra / README.md
Created October 27, 2022 23:42 — forked from davestewart/README.md
Decompile JavaScript from source maps

Decompile JavaScript from source maps

Overview

Modern JavaScript build tools compile entire folder structures of JavaScript code into single, minified files that are near-impossible to read, but can also include source maps which can be used to display the original code in tools such as the Chrome DevTools Sources panel.

These source maps can be processed to extract mainly meaningful code and file structures, by installing a package and running a simple bash command.

Generally, production builds shouldn't include source maps, but if you do manage to lose your source files, or for some (obviously, ethical!) reason need to view the original files, and you happen to have / find the source maps, you're good to go.

@PostPCEra
PostPCEra / postgres-cheatsheet.md
Created October 19, 2021 05:58 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@PostPCEra
PostPCEra / addDay.js
Last active September 25, 2020 16:21 — forked from gitdagray/kanview_complete.py
Full Python code for web scraping Kanview utilizing Selenium, Beautiful Soup, and pandas
// source : https://date-fns.org/
import { addYears, formatWithOptions, toUpper } from 'date-fns/fp'
import { eo } from 'date-fns/locale'
const addFiveYears = addYears(5)
const dateToString = formatWithOptions({ locale: eo }, 'D MMMM YYYY')
const dates = [