Skip to content

Instantly share code, notes, and snippets.

View mattapperson's full-sized avatar
🏠
Working from home

Matt Apperson mattapperson

🏠
Working from home
View GitHub Profile
{
"basics": {
"name": "Matt Apperson",
"label": "Staff Software Engineer @ Fireworks AI | Leading Engineering Teams, LLM Agent Frameworks",
"email": "[email protected]",
"phone": "7174067003",
"url": "https://mattapperson.com",
"summary": "Experienced software engineer specializing in LLM agent frameworks and leading engineering teams.",
"location": {
"city": "Mt. Joy",
{
"basics": {
"name": "Matt Apperson",
"label": "Staff Software Engineer @ Fireworks AI | Leading Engineering Teams, LLM Agent Frameworks",
"email": "[email protected]",
"phone": "7174067003",
"website": "https://mattapperson.com",
"location": {
"city": "Mt. Joy",
const testStrings = [
" I don't want to take it.",
" I don't want to take...",
" I don't want to take away.",
" I don't want to take away",
" I don't want to take away from",
" I don't want to take away from",
" I don't want to take away from the",
" I don't want to take away from the",
" I don't want to take away from the truth!",
let dailyText = await loadText()
if (config.runsInWidget) {
let widget = createWidget(dailyText)
Script.setWidget(widget)
Script.complete()
} else {
Safari.open(dailyText.url.replace('/wol/','jwpub://' ))
}
function myFunction(buttonEl, rowID) {
// ... do something with rowID
}
<button onclick="myFunction(this, 'rowID')">
// Another closure
function myFunction(rowID) {

Automocking thoughts

Allow users to create mocks using 2 APIs... Consumers or providors could write mocks using these tools...

// This block only runs if recording live
await ifLiveBlock(async () => {
  await new Promise(resolve => {
    const pipe = spawn("mongod", ["--dbpath=<LOCATION>", "--port", "1223"]);
@mattapperson
mattapperson / rancher-deploy.js
Last active October 14, 2015 19:13
rancher-deploy - A quick script I wrote to deploy services to rancher in one command... will finish it up and deploy via NPM soon...
#!/usr/bin/env node
process.env.RANCHER_URL = '<your project URL here>';
process.env.RANCHER_ACCESS_KEY = '<your access key here>';
process.env.RANCHER_SECRET_KEY = '<your secret key here>';
var spawn = require('child_process').spawn;
var exec = require('child_process').exec;
var path = require('path');
var fs = require('fs')
@mattapperson
mattapperson / implantation.m
Last active August 29, 2015 14:07
Get a Dictionary of native values to return to Titanium
// Where response is an instance of NativeCustomClass
NSDictionary *event = [self dictionaryValues:response fromClass:[NativeCustomClass class]];
@mattapperson
mattapperson / Instructions
Last active August 29, 2015 14:05
CommonJS Controllers for alloy
In your Alloy project, add the alloy.jmk file to the app folder and create a directory called template, in the template directory, add the component.js file. Then simply start building your alloy apps with commonjs style controller.
Want to require in another controller? simply access it like this:
var otherController = require('otherController').class;
Events are now namespaced to the `C` variable for views.
find-up() {
local path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
path=${path%/*}
done
if [ "$path" != "" ]
then
echo "$path"
fi
}