Skip to content

Instantly share code, notes, and snippets.

View mcat's full-sized avatar

Mark Catalano mcat

View GitHub Profile
@Artefact2
Artefact2 / README.md
Last active June 12, 2025 05:51
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggml-org/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@crtr0
crtr0 / devrel_faq.md
Last active December 31, 2019 10:52
Developer Evangelism FAQ

Q: What are the specific goals of developer relations?

There's no simple answer here, but I like to think of developer advocacy/evangelism/relations/etc as an extension of one (or more) of your company's core functions: product, sales, marketing and support. When I was a developer evangelist at Twilio, my team supported the Marketing org, so the team goals aligned with Marketing goals (driving signups).

Often you'll encounter a team of "Developer Advocates". The Google Chrome org has a team of Developer Advocates for example. These folks tend to align more with the Product organization, and their goals/metrics likewise align with the broader goals/metrics of the Product org.

Q: How do you measure it?

You can use the baseline metrics associated with your functional groups (i.e. top of funnel signups for Marketing) and then layer on metrics that capture the impact that the team is having in isolation from the overall organization. Example: developers who signed-up for your product because an evangelist

@philhawksworth
philhawksworth / conference-mc-tips.md
Last active February 13, 2023 21:52
Conference MC-ing tips

👀📎 It looks like you're preparing to MC a conference...

🚨 GIANT DISCLAIMER: This stuff is far from authoritative. But it's what I think works for me, and what I enjoy in an MC when I'm attending a conference.


Biggest tip - enjoy yourself.

@yangshun
yangshun / docusaurus-copy-button.md
Last active April 4, 2023 07:07
How to add the "Copy" button to code blocks in Docusaurus

Adding "Copy" (to Clipboard) Button

If you would like to add a button to your fenced code blocks so that users may copy the code, you can do so in Docusaurus. You will have to add some code to your Docusaurus project, as seen below.

Under static/js, create a file called code-block-buttons.js with the following:

// Turn off ESLint for this file because it's sent down to users as-is.
/* eslint-disable */
window.addEventListener('load', function() {

For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:

First method (override Material UI classnames):

1 - Add the property classes in the AppBar component:

    <AppBar classes={{root: 'my-root-class'}}
@WilliamIsted
WilliamIsted / Craft CMS Image Alt Text
Last active April 3, 2019 22:38
Craft CMS - Show image alt text if it has been set and isn't autogenerated
<img{% if image.title | kebab != image.slug %} alt="{{ image.title }}"{% endif %} src="{{ image.getUrl('thumb') }}">
Example Usage:
{% if entry.images | length %}
{% for image in entry.images %}
<img{% if image.title | kebab != image.slug %} alt="{{ image.title }}"{% endif %} src="{{ image.getUrl('thumb') }}">
{% endfor %}
{% endif %}

Using auto-generated UTM tagged URLs within Google AdWords along with auto-tagging for Google Analytics

The Challenge

You want to use Google AdWords' auto-tagging for a deep integration with Google Analytics, but you need to use UTM parameters with your other analytics and marketing systems, but don't want to manually tag all of your ads.

The Solution

Within AdWords, you can use ValueTrack and custom parameters along with a tracking template to automatically generate a tagged URL with all of the information you need. A tracking template which populates the query string with campaignid, adgroupid and keywork looks like this:

{lpurl}?campaignid={campaignid}&adgroupid={adgroupid}&term={keyword}

@beastawakens
beastawakens / gtm-intercom.js
Created January 22, 2016 14:33
Adding Google Tag Manager variables to intercomSettings
<script>
// app ID
var intercomSettings = {
app_id: "{{IC - Dynamic app ID}}"
};
// Verifies and cleans all GTM variables
function pushGTMVariablesToIntercom(gtmKey, gtmValue) {
if("{{User - Account - Type}}" != "Guest"){
if(gtmValue != null && gtmValue != "" && gtmValue != "undefined") {
@bransinanderson
bransinanderson / craft_state_region.txt
Created June 21, 2015 20:14
Craft CMS Field Dropdown State/Region
{"options":[{"label":"Alabama","value":"AL","default":""},{"label":"Alaska","value":"AK","default":""},{"label":"Arizona","value":"AZ","default":""},{"label":"Arkansas","value":"AR","default":""},{"label":"California","value":"CA","default":""},{"label":"Colorado","value":"CO","default":""},{"label":"Connecticut","value":"CT","default":""},{"label":"Delaware","value":"DE","default":""},{"label":"District of Columbia","value":"DC","default":""},{"label":"Florida","value":"FL","default":""},{"label":"Georgia","value":"GA","default":""},{"label":"Hawaii","value":"HI","default":""},{"label":"Idaho","value":"ID","default":""},{"label":"Illinois","value":"IL","default":""},{"label":"Indiana","value":"IN","default":""},{"label":"Iowa","value":"IA","default":""},{"label":"Kansas","value":"KS","default":""},{"label":"Kentucky","value":"KY","default":""},{"label":"Louisiana","value":"LA","default":""},{"label":"Maine","value":"ME","default":""},{"label":"Maryland","value":"MD","default":""},{"label":"Massachusetts","va
@vgeshel
vgeshel / function.js
Last active March 6, 2025 13:44
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};