Skip to content

Instantly share code, notes, and snippets.

View JesseRWeigel's full-sized avatar

Jesse R Weigel JesseRWeigel

View GitHub Profile
@JesseRWeigel
JesseRWeigel / mcp-guide.md
Created April 10, 2025 13:49
A Comprehensive Guide to the Model Context Protocol: Understanding and Implementing Contextual Frameworks

A Comprehensive Guide to the Model Context Protocol: Understanding and Implementing Contextual Frameworks

Introduction

The Model Context Protocol (MCP) is an essential framework for developing and understanding models in various fields, particularly in machine learning and artificial intelligence. This guide aims to provide intermediate learners with a thorough understanding of MCP, its applications, benefits, and implementation strategies. By the end of this guide, readers will be equipped with the knowledge to effectively utilize the MCP in their own projects.

Understanding the Model Context Protocol

const GET_POSTS = gql`
query GetPosts {
posts {
edges {
node {
id
title
author {
node {
firstName
@JesseRWeigel
JesseRWeigel / DateMultiPicker.jsx
Created October 7, 2019 18:53 — forked from RedHatter/DateMultiPicker.jsx
Range and multi select for @dmtrKovalenko/material-ui-pickers
import React, { useState, useContext, useRef } from 'react'
import { DatePicker } from 'material-ui-pickers'
import { MuiPickersContext } from 'material-ui-pickers'
export default function DateMultiPicker({
value,
onChange,
labelFunc,
format,
emptyLabel,
@JesseRWeigel
JesseRWeigel / jsforce-record-creation.js
Created August 29, 2018 16:04
Sample jsforce code to create a new record in Salesforce
const conn = new jsforce.Connection({
// you can change loginUrl to connect to sandbox or prerelease env.
loginUrl: 'https://example.my.salesforce.com/'
})
conn.login(username, password, function (err, userInfo) {
if (err) {
return console.error(err)
}
// Now you can get the access token and instance URL information.
// Save them to establish connection next time.
@JesseRWeigel
JesseRWeigel / accordion.css
Created November 9, 2017 21:59
Accordion Styles
.ui-accordion {
border-radius: 2px;
-webkit-box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
}
.ui-accordion .ui-header {
background: none;
background-color: #fff;
border: none;
@JesseRWeigel
JesseRWeigel / commands.txt
Created April 28, 2017 19:22
ImageMagick Compression Commands
// Must install ImageMagick first
http://www.imagemagick.org/script/index.php
//This compresses a jpg with no visible loss of quality. Add in your own file names for target.jpg and result.jpg
convert -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% target.jpg result.jpg
// This does the same as above but to an entire folder (will overwrite original files):
mogrify -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% *.jpg
//This does the same thing but to all subfolders as well (Be careful with this one it will overwrite all original files)
@JesseRWeigel
JesseRWeigel / set-year.js
Created February 17, 2017 19:51
Materialize Datepicker Set Year Function
(function () {
let thisInputID, thisPickerID;
$('.datepicker').pickadate({
//Other options can go here
onOpen: function() {
//Get ID for input and this particular picker
thisInputID = `#${$(this.$node.context).attr('id')}`;
thisPickerID = `${thisInputID}_root`;
},
onClose: function() {