Skip to content

Instantly share code, notes, and snippets.

@SeanTRobinson
SeanTRobinson / CStackGrowthCheck.cs
Last active August 29, 2015 14:01
Determines whether the stack grows upwards or downwards.
#include <iostream>
class MethodCaller {
public:
static int getMemoryAddress() {
int var = 2;
return var;
}
};
@SeanTRobinson
SeanTRobinson / PascalTriangleCreator.cs
Last active August 29, 2015 14:01
Generates a Pascal Triangle in an array structure.
private static int[, ] createTriangle(int size)
{
int[,] triangle = new int[size,size];
for (int i = 0; i < size; i++)
{
triangle[i, 0] = 1;
for (int j = 1; j < i; j++)
{
triangle[i, j] = triangle[i-1, j-1] + triangle[i-1, j];
}
@SeanTRobinson
SeanTRobinson / SieveOfEratosthenes.cs
Last active August 29, 2015 14:01
A C# implementation of the Sieve of Eratosthenes algorithm.
namespace SieveOfEratosthenes
{
class SieveOfEratosphenes
{
public static void printPrimesUntil(int n)
{
List<int> primes = getPrimesUntil(n);
printList(primes);
}
@SeanTRobinson
SeanTRobinson / ConfluenceBackup.sh
Last active November 28, 2024 03:41
Backup Atlassian Jira and Confluence from the command line.
#!/bin/bash
USERNAME=<username>
PASSWORD=<password>
INSTANCE="<company>.atlassian.net"
LOCATION="./Backups/"
mkdir "Backups"
# Grabs cookies and generates the backup on the UI.
@SeanTRobinson
SeanTRobinson / ScopeSafeConstructor
Last active August 29, 2015 14:05
If somebody forgets to call a constructor with 'new', then 'this' refers to the global scope. When you assign properties within the constructor, you are instead augmenting the global scope. The following pattern helps stop that from happening.
function Book(isbn, title, author) {
if(this instanceof Book) {
this.isbn = isbn;
this.title = title;
this.author = author;
} else {
return new Book(isbn, title, author);
}
}
@SeanTRobinson
SeanTRobinson / ScopeSafe_WithProto_Constuction.js
Created September 10, 2014 09:00
A scope safe object creation example with a clean prototype manipulation.
function Book(isbn, title, author) {
if (this instanceof Book) {
this.isbn = isbn;
this.title = title;
this.author = author;
} else {
return new Book(isbn, title, author);
}
}
@SeanTRobinson
SeanTRobinson / setup-ubuntu_14.04-dellxps13.sh
Last active August 10, 2016 16:00
A script to fix the issues trying to get Ubuntu 14.04 running on the Dell XPS 13 1950 laptops.
#!/usr/bin/env bash
echo "================================"
echo "Dell XPS 13 1950 Fixes for Ubuntu 14.04"
echo "================================"
echo "Downloading required files"
echo "--------------------------------"
mkdir patch/
cd patch/
@SeanTRobinson
SeanTRobinson / master-ai-bootstrap.md
Last active June 30, 2025 14:10
This is a one-shot AI bootstrap for any project — capable of spinning up an intelligent, self-maintaining, cross-disciplinary doc system that acts like a virtual team of experts. All of it is sustained by machine-enforced rules, allowing the human to focus solely on creativity, goals, and high-level design.

[MASTER BOOTSTRAP PROMPT — DOC‑DRIVEN DEVELOPMENT v3.5]

SYSTEM INSTRUCTIONS (LLM-ONLY) • You are an autonomous documentation orchestrator. Follow all instructions exactly. Do not output any commentary, explanations, or text outside the required files and summaries. • Do not invent requirements, personas, or rules not explicitly provided or requested by the user. • After outputting questions, halt and await user input. Do not proceed until input is received. • Output each file as raw Markdown, with no extra text or commentary between files. Prepend YAML front-matter to every .mdc file if RULES_DIR is .copilot/instructions/. • If a file exceeds 9,000 tokens, split at the nearest section boundary and add a sequence header to each chunk. Never split mid-sentence or mid-list. • After file generation, validate that all required files and sections are present. If any are missing, regenerate only the missing parts. • Only include optional personas if the user confirms their inclusion. Do not assume their presence. I