Skip to content

Instantly share code, notes, and snippets.

View hackur's full-sized avatar

Jeremy Sarda hackur

  • Las Vegas, NV
  • 08:25 (UTC -07:00)
View GitHub Profile
@hackur
hackur / svg-css-inliner-color-hexer-gradient-defs-grouper-number-formatter.js Convert Illustrator SVG export into cross-platform CSS independent mode. CSS rule and style inlining, group gradients into a definitions tag, remove elements with display set to none, make colors hex. Works with react-native-web react-native-svg and svgs to give cross-platform web and native mobile rendering of any SVG produced in Illustrator.
/*
Open console.
(Import https://raw.githubusercontent.com/MikeMcl/decimal.js/master/decimal.js first if you want/need number formatting)
Then copy & paste this + enter, to run this.
Copy console output to a NewFile.js or NewFile.jsx file.
prettier --write NewFile.js
*/
/* eslint no-console: ["error", { allow: ["log"] }] */
/* global document, Decimal*/
(() => {
@hackur
hackur / SVG.js
Created April 9, 2018 23:26 — forked from beausmith/SVG.js
React Native SVG Component using react-native-svg
// React Native SVG Component
// https://github.com/react-native-community/react-native-svg
//
// Process
// 1. Clean up SVG in graphics app (Illustrator/Sketch/etc) to set consistent width, height, and make sure the viewBox is "0, 0, W, H"
// 2. Open SVG in text editor to remove width, height, and any undesired/unnecessary styles
// 3. Open in https://jakearchibald.github.io/svgomg/ and optimize.
// 4. Integrate info app by converting SVG tags to component-based SVG tags used in https://github.com/react-native-community/react-native-svg and updating with JS variables such that I can controls dimensions, colors, etc.
// 5. Use in other components.
//
@hackur
hackur / create-react-app-on-heroku.sh
Created June 4, 2018 20:47 — forked from mars/create-react-app-on-heroku.sh
Create a React app & deploy to Heroku
## Global install of the app generator
npm install -g create-react-app
## Setup the app (first-time only)
create-react-app my-app
cd my-app
git init
# Create the Heroku app; requires free account at https://www.heroku.com/
heroku create -b https://github.com/heroku/heroku-buildpack-static.git

%MACROS Preamble = "I am an expert software-engineer/architect. Memory resets every session, therefore I persist & load docs exactly as below, using explicit paging for token-efficiency." FM = "timestamp|status|ids|confidence" # front-matter tuple CHECK = "[VAL] verify; [GAP] info-gap; [CONS] consistency" # tri-checkpoint list %END

%SYMBOLS # one-byte UTF-8 saves tokens yet stays readable 📥 ACTIVE_MEMORY 📤 CACHED_MEMORY 🗄️ ARCHIVED_MEMORY

@hackur
hackur / draft2-prompt.md
Created May 22, 2025 11:17 — forked from freezscholte/draft2-prompt.md
Draft Coding Prompt

Hybrid Memory Bank System

!!I WILL ALWAYS FOLLOW THE FRAMEWORK RULES PROVIDED IN THIS PROMPT!!

!!! ATTENTION: Core System Definition I am an expert software engineer and architect. My operational memory resets between sessions, necessitating meticulous documentation via this Memory Bank system. I rely on this system to regain context and continue work effectively. I employ a flexible and adaptive context loading strategy with explicit memory management to balance comprehension with efficiency.

Core Operating Principle: I aim to function autonomously where possible, making appropriate decisions based on available context and confidence level. I request user input strategically only when facing critical ambiguity, low confidence on high-impact decisions, or explicit validation requirements. I acknowledge that perfect documentation synchronization is challenging and focus on maintaining a practical, accurate representation of current state and planned actions.

Adaptive Approach: I scale my pro