Skip to content

Instantly share code, notes, and snippets.

View agentgill's full-sized avatar

Mike Gill agentgill

View GitHub Profile
@agentgill
agentgill / README.md
Created November 26, 2024 18:23 — forked from disler/README.md
Four Level Framework for Prompt Engineering
@agentgill
agentgill / understanding_fasthtml.md
Created September 14, 2024 22:07 — forked from jph00/understanding_fasthtml.md
Understanding FastHTML Components and Architecture - a Claude Conversation

Understanding FastHTML Components and Architecture

🧑 human (Aug 26, 2024, 03:52 PM)

What are the components of FastHTML, and how do they work together? What are some key things I need to understand to write idiomatic FastHTML apps?

🤖 assistant (Aug 26, 2024, 03:52 PM)

Based on the documentation provided, here are the key components of FastHTML and how they work together to create web applications:

  1. Core Components:
@agentgill
agentgill / ReadFileData.cls
Created October 5, 2021 06:10 — forked from darkacer/ReadFileData.cls
Parse and read through Excel using LWC and Sheetjs
public with sharing class ReadFileData {
@AuraEnabled
public static String readFileFromRecord(String recordId) {
ContentDocumentLink contentDocumentLink = [
SELECT id, ContentDocumentId, ContentDocument.Description,
ContentDocument.Title, LinkedEntityId
FROM ContentDocumentLink
WHERE LinkedEntityId = '0017F00002nb4ktQAA'
LIMIT 1
];
@agentgill
agentgill / clean_code.md
Created August 14, 2020 11:30 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@agentgill
agentgill / countries.txt
Created March 12, 2020 11:56 — forked from mantognini/countries.txt
countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
@agentgill
agentgill / BatchApexFramework.cls
Created April 25, 2019 09:51 — forked from JitendraZaa/BatchApexFramework.cls
Framework to fix - Salesforce Governor Limit of 100 jobs in Flex Queue
/**
* @Author : Jitendra Zaa
* @Date : Apr 21 2019
* Framework to fix limit of 100 Batch Apex in Queue
* */
public class BatchApexFramework implements Schedulable{
private static Integer availableBatchLimit = null;
@agentgill
agentgill / repo-reset.md
Created January 20, 2019 20:21 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@agentgill
agentgill / deploy.js
Created June 30, 2018 10:48 — forked from keirbowden/deploy.js
Simple node script to execute a deployment via SFDX and capture and output any errors that occurred
#!/usr/local/bin/node
var fs=require('fs');
var child_process=require('child_process');
var username='keir.bowden@googlemail.com';
var deployParams=['force:mdapi:deploy', '-d', 'src',
'-u', username, '--json'];
@agentgill
agentgill / SFDX Command List
Created April 9, 2018 19:41 — forked from Jaganpro/SFDX Command List
SFDX Commands
USMCLJVALAIYMB2:best-repo-ever jvalaiyapathy$ sfdx force:doc:commands:list
=== Commands
force:alias:list # list username aliases for the Salesforce CLI
force:alias:set # set username aliases for the Salesforce CLI
force:apex:class:create # create an Apex class
force:apex:execute # execute anonymous Apex code
force:apex:log:get # fetch a debug log
global class XmlToJson {
// Try to determine some data types by pattern
static Pattern
boolPat = Pattern.compile('^(true|false)$'), decPat = Pattern.compile('^[-+]?\\d+(\\.\\d+)?$'),
datePat = Pattern.compile('^\\d{4}.\\d{2}.\\d{2}$'),
timePat = Pattern.compile('^\\d{4}.\\d{2}.\\d{2} (\\d{2}:\\d{2}:\\d{2} ([-+]\\d{2}:\\d{2})?)?$');
// Primary function to decode XML
static Map<Object, Object> parseNode(Dom.XmlNode node, Map<Object, Object> parent) {
// Iterate over all child elements for a given node
for(Dom.XmlNode child: node.getChildElements()) {