Skip to content

Instantly share code, notes, and snippets.

View mrjcleaver's full-sized avatar

Martin Cleaver mrjcleaver

  • Aparine
  • Guelph, ON, Canada
View GitHub Profile
@mrjcleaver
mrjcleaver / .clinerules
Created April 28, 2025 00:43 — forked from ruvnet/.clinerules
SPARC Cursor/Cline Rules guide structured agentic coding through simplicity, iteration, clear documentation, symbolic reasoning, rigorous testing, and focused AI-human collaboration, ensuring maintainable, secure, high-quality outcomes.
# SPARC Agentic Development Rules
Core Philosophy
1. Simplicity
- Prioritize clear, maintainable solutions; minimize unnecessary complexity.
2. Iterate
- Enhance existing code unless fundamental changes are clearly justified.
@mrjcleaver
mrjcleaver / .roomodes.json
Created April 15, 2025 14:13 — forked from ruvnet/.roomodes.json
This guide introduces Roo Code and the innovative Boomerang task concept, now integrated into SPARC Orchestration. By following the SPARC methodology (Specification, Pseudocode, Architecture, Refinement, Completion) and leveraging advanced reasoning models such as o3, Sonnet 3.7 Thinking, and DeepSeek, you can efficiently break down complex proj…
{
"customModes": [
{
"slug": "sparc",
"name": "⚡️ SPARC Orchestrator",
"roleDefinition": "You are SPARC, the orchestrator of complex workflows. You break down large objectives into delegated subtasks aligned to the SPARC methodology. You ensure secure, modular, testable, and maintainable delivery using the appropriate specialist modes.",
"customInstructions": "Follow SPARC:\n\n1. Specification: Clarify objectives and scope. Never allow hard-coded env vars.\n2. Pseudocode: Request high-level logic with TDD anchors.\n3. Architecture: Ensure extensible system diagrams and service boundaries.\n4. Refinement: Use TDD, debugging, security, and optimization flows.\n5. Completion: Integrate, document, and monitor for continuous improvement.\n\nUse `new_task` to assign:\n- spec-pseudocode\n- architect\n- code\n- tdd\n- debug\n- security-review\n- docs-writer\n- integration\n- post-deployment-monitoring-mode\n- refinement-optimization-mode\n\nValidate:\n✅ Files < 500 lines\n✅ No hard-coded
var username = '';
var password = '';
var encoded_credentials = new Buffer(username + ':' + password).toString('base64');
fetch('https://example.com', { method: 'POST', headers: {'Authorization': 'Basic ' + encoded_credentials} })
.then(function(res) {
return res.json();
})
.then(function(body) {
package examples.docs
import com.atlassian.applinks.api.ApplicationLink
import com.atlassian.applinks.api.ApplicationLinkService
import com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType
import com.atlassian.jira.issue.Issue
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.sal.api.net.Request
import com.atlassian.sal.api.net.Response
import com.atlassian.sal.api.net.ResponseException
Move-LibraryDirectory "My Pictures" "Z:\Pictures"
Move-LibraryDirectory "My Video" "Z:\Videos"
Move-LibraryDirectory "My Music" "Z:\Music"
Move-LibraryDirectory "Downloads" "Z:\Downloads"
#Move-LibraryDirectory "Personal" "Z:\Documents"
Move-LibraryDirectory "Desktop" "Z:\Desktop"
# Usage: see http://www.hurryupandwait.io/blog/setup-a-new-machine-with-just-a-url-and-chocolatey-package
# Get RAW URL from this GIST
# START http://boxstarter.org/package/nr/url?<RAW URL from GIST>
#######################
# Windows Configuration
Update-ExecutionPolicy Unrestricted
Disable-InternetExplorerESC
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions
599$ knife data bag list
lumberjack
600$ knife data bag show lumberjack
secrets
601$ knife data bag show lumberjack/secrets
certificate
id
key
On my knife workstation:
mkdir -p data_bags/lumberjack
cd data_bags/lumberjack
wget https://raw.githubusercontent.com/rackspace-cookbooks/elkstack/master/test/integration/default/data_bags/lumberjack/secrets.json
wget https://raw.githubusercontent.com/rackspace-cookbooks/elkstack/master/test/integration/default/encrypted_data_bag_secret -O encrypted_data_bag_secret
knife data bag create lumberjack
knife data bag --secret-file=encrypted_data_bag_secret from file lumberjack secrets.json data_bags/lumberjack
[2015-01-20T01:27:14+04:00] WARN: Previous service[elasticsearch]: /var/chef/cache/cookbooks/elasticsearch/recipes/default.rb:72:in `from_file'
[2015-01-20T01:27:14+04:00] WARN: Current service[elasticsearch]: /var/chef/cache/cookbooks/elkstack/recipes/elasticsearch.rb:30:in `from_file'
[2015-01-20T01:27:15+04:00] WARN: Could not find encrypted data bag item lumberjack/secrets
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/bp_elkstack/recipes/default.rb
================================================================================
NoMethodError
-------------
Simple install based on
625 20150119-13:32:09 git clone https://github.com/rackspace-cookbooks/elkstack.git elkstack
626 20150119-13:32:24 cd elkstack/
630 20150119-13:34:45 knife cookbook upload elkstack --include-dependencies
638 20150119-13:36:36 emacs Berksfile # add a dependency on curl
639 20150119-13:36:58 berks install
641 20150119-13:38:18 berks upload --ssl-verify=false
# https://github.com/berkshelf/berkshelf/issues/1132
650 20150119-13:51:20 cd /Volumes/Storage/martincleaver/.berkshelf/cookbooks/percona-multi-0.1.0/attributes/