Skip to content

Instantly share code, notes, and snippets.

View kevinold's full-sized avatar

Kevin Old kevinold

View GitHub Profile
@kevinold
kevinold / git-flow_test.sh
Created August 19, 2010 16:45
testing git-flow on existing git repo
# In reply to my own question
# (http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/#comment-69995567)
# about using git-flow with existing git repos I experimented with a dummy
# git repo and it appears rather straight-forward
kold@Macintosh-27 $ git init test_git_flow
Initialized empty Git repository in /private/tmp/test_git_flow/.git/
(/tmp)
kold@Macintosh-27 $ cd test_git_flow/
@kevinold
kevinold / ouput.txt
Created February 15, 2025 04:50
Output from successful run of testCompanyNameValidatorAgent.ts
❯ npx tsx scripts/testCompanyNameValidatorAgent.ts
{
role: 'assistant',
content: '{"score":100,"reason":"Apple is a well-known and established technology company famous for its products like the iPhone, MacBook, and Apple Watch. It is widely recognized globally, making it undoubtedly a real company."}',
refusal: null,
tool_calls: [],
parsed: {
score: 100,
reason: 'Apple is a well-known and established technology company famous for its products like the iPhone, MacBook, and Apple Watch. It is widely recognized globally, making it undoubtedly a real company.'
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11,<3.13"
# dependencies = []
# ///
# -*- coding: python -*-
# cd work/crewai-giggs-experiments
# uvx crewai create crew <project-name>
@kevinold
kevinold / safari-open-pages.py
Created September 29, 2023 16:33 — forked from aleks-mariusz/safari-open-pages.py
This script fetches the current open tabs in all Safari windows. Useful to run remotely on your mac when you are at work and want to read a page you have open (remotely) at home but don't remember the url but can log in to your home system on the command line
#!/usr/bin/python
#
# This script fetches the current open tabs in all Safari windows.
# Useful to run remotely on your mac when you are at work and want
# to read a page you have open (remotely) at home but don't remember
# the url but can log in to your home system on the cmmand line
#
import sys

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@kevinold
kevinold / gist:368387f8da42ce7d24179f3a14359051
Created September 27, 2016 17:26 — forked from negativo/gist:152716565e4091eb9039f55f9781badd
send sms with aws provider in NODEJS
var AWS = require('aws-sdk');
AWS.config.region = 'your aws region';
AWS.config.update({
accessKeyId: "your access id",
secretAccessKey: "your secret access key",
});
var sns = new AWS.SNS();
var params = {
@kevinold
kevinold / manually-remove-resource-from-amplify-project.md
Created August 12, 2022 13:44 — forked from josefaidt/manually-remove-resource-from-amplify-project.md
Instructions for surgically removing non-existent resource from local Amplify project

Let's say we've removed a Lambda Layer from the Lambda Console and are no longer able to perform operations using the Amplify CLI.

An error occurred fetching the latest layer version metadata for ""

> amplify remove function
? Choose the resource you would want to remove 10263layer58c94806 (layer)
When you delete a layer version, you can no longer configure functions to use it.
However, any function that already uses the layer version continues to have access to it.
✖ Loading layer data from the cloud...
@kevinold
kevinold / trivial_file_upload_service.rb
Created August 8, 2011 15:58
Upload file in Sinatra
require 'rubygems'
require 'sinatra'
require 'fileutils'
# upload with:
# curl -v -F "data=@/path/to/filename" http://localhost:4567/user/filename
# or just go to http://localhost:4567/user/filename with a browser
get '/:name/:filename' do
@kevinold
kevinold / react-native-parse-xml-example.js
Created October 25, 2016 13:14 — forked from benvium/react-native-parse-xml-example.js
Parse XML Example using React Native.xmldom is a pure JavaScript implementation of an XML Parser. I've added it to window so that browser modules that require it will work. Tested on iOS and Android.
/**
*
* Before use, type:
* ```
* npm install xmldom --save
* ```
*/
window.DOMParser = require('xmldom').DOMParser;
@kevinold
kevinold / .ackrc
Created February 10, 2013 13:54 — forked from hernamesbarbara/.ackrc
#ack is a tool like grep, designed for programmers with large trees of heterogeneous source code
#to install ack, see http://betterthangrep.com/
#to use ack, launch terminal (mac osx) and type 'ack <some_keywords>'
#ack will search all files in the current directory & sub-directories
#here's how I have my config file setup. this file is located on mac osx here
# ~/.ackrc
# Always sort the files