Skip to content

Instantly share code, notes, and snippets.

View jordotech's full-sized avatar
🎯
Focusing

jordotech jordotech

🎯
Focusing
  • Austin, TX
  • 12:23 (UTC -05:00)
View GitHub Profile
@jordotech
jordotech / custom_modes.json
Created May 18, 2025 15:19
Jordan's global roo modes
{
"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
@jordotech
jordotech / custom_modes.json
Created May 2, 2025 18:55
Roo Code custom modes (global config)
{
"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
@jordotech
jordotech / settings.php
Last active September 28, 2019 14:34
Drupal 8 starter settings.php for https://github.com/jordotech/d8-docker
<?php
// @codingStandardsIgnoreFile
$databases['default']['default'] = [
'database' => 'drupal',
'username' => 'drupal',
'password' => 'drupal',
'host' => 'db',
'port' => '3306',
@jordotech
jordotech / docker-compose.yml
Created September 26, 2019 14:38
docker-compose.yml
version: "3"
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
@jordotech
jordotech / periodic_table.html
Created June 12, 2019 17:51
AWS Periodic table with checkboxes
<html lang="en" xml:lang="en" xmlns= "https://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
@jordotech
jordotech / form.py
Created May 2, 2019 16:31
Django form db hits, move to __init__
# Bad
class ShipForm(forms.Form):
printer_station = forms.CharField(
label=_('Print Station'),
widget=forms.Select(choices=get_printer_station_choices()), # Bad, this method hits the db during reload
required=False)
# Good
class ShipForm(forms.Form):
def __init__(self, *args, **kwargs):
@jordotech
jordotech / kwargs.py
Created February 25, 2019 19:58
how to use kwargs
"""
You can attach **kwargs as a param to any function, it will allow passing aritrary key=value pairs to the function as parameters.
Its up to you to intercept the kwarg in your receiving function to make use of it, or else it's just ignored
"""
def no_kw_function(id=None, price_over=None, length=None, width=None):
print(id)
print(price_over)
print(length)
print(width)
@jordotech
jordotech / slide.js
Created January 28, 2019 18:48
related
$('.related-slides').slick({
lazyLoad: 'ondemand',
slidesToShow: 4,
slidesToScroll: 4,
infinite: true,
dots: true,
responsive: [
{
breakpoint: 1024,
settings: {
@jordotech
jordotech / dashboard_section.html
Created December 23, 2018 19:23
Django Jet dashboard sections
<div class="dashboard-container columns_2 cf">
<div class="dashboard-column-wrapper">
<div class="dashboard-column ui-droppable ui-sortable">
<div class="dashboard-item collapsible ">
<div class="dashboard-item-header ui-sortable-handle">
<span class="dashboard-item-header-buttons"></span>
<span class="dashboard-item-header-title">test</span>
<div class="cf"></div>
</div>
<div class="dashboard-item-content" style="height: auto;">
@jordotech
jordotech / kitpart orderitem ids.txt
Created August 31, 2018 14:29
which orderitems are kitparts in the queryset
order_item_ids = [q.get('id') for q in queryset]
kitpart_orderitem_ids = [oid.get('item') for oid in OrderItemDetail.objects.values('item').filter(name='kitparent', id__in=order_item_ids)]