Skip to content

Instantly share code, notes, and snippets.

@PostPCEra
PostPCEra / Manus-ai-picture-to-code.html
Created April 4, 2025 15:10
Manus-ai-picture-to-code of a JOB List
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI & Tech Startup Directory</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<style>
.dark-mode {
background-color: #1F2937;
@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
// Conditionals in JSX
// https://vasanthk.gitbooks.io/react-bits/content/patterns/18.conditionals-in-jsx.html
// Note: Look at first version of code with TERNARY operator, huge Congitive load , so will cost Brain CPU cycles, Tax on Productivity ..
// My favorite, EARLY Returns to the Rescue ...
// alternatively simply use early returns
const sampleComponent = () => {
const basicCondition = flag && flag2 && !flag3;
if (!basicCondition) return <p>Derp</p>;
all_tags = []; // init with empty array ; accuumulate all selcted tags here
// ------------------------
get_all_selected_tags = function (tag) {
// if tag already exists in the list, remove it, otherwise add it to list
if (all_tags.includes(tag)) {
all_tags = all_tags.filter((item) => item != tag); // remove tag
} else {
all_tags.push(tag); // add tag
}
console.log("all tags:", app.all_tags);
# 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
@PostPCEra
PostPCEra / react-stand-alone.html
Created December 12, 2023 09:26
React stand alone
<html>
<head>
<meta charset="UTF-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.development.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.development.js"></script>
<!---this is used to compile on run time--->
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script>
</head>
<body>
@PostPCEra
PostPCEra / FilterArray-ofItems-and-displaythem.jsx
Last active November 30, 2023 21:15
various ways of Filtering an ARRAY of items and displaying them.
// 'use client'; // needed if using Next.js 13
// This page will demonstrate various ways for filtering and displaying an ARRAY of items.
import React, { useState } from 'react';
import { SegmentedControl } from '@mantine/core';
const sportPersonList = [
{ id: 1, name: 'LeBron James', category: 'Basketball' },
{ id: 2, name: 'Serena Williams', category: 'Tennis' },