Skip to content

Instantly share code, notes, and snippets.

View jnewman12's full-sized avatar
🎯
Focusing

James Newman jnewman12

🎯
Focusing
  • Santa Monica, CA
View GitHub Profile

Development Workflow: Spec β†’ Code

THESE INSTRUCTIONS ARE CRITICAL!

They dramatically improve the quality of the work you create.

Phase 1: Requirements First

When asked to implement any feature or make changes, ALWAYS start by asking: "Should I create a Spec for this task first?"

@jnewman12
jnewman12 / default.md
Created July 9, 2025 04:09 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@jnewman12
jnewman12 / active_storage.md
Last active June 16, 2019 09:44
WDI DTLA Active Storage Intro

File Uploads with Rails and Active Storage

rails + active-storage


Lesson Objectives

  • set up an account on Amazon Web Services to store uploaded images inside AWS S3
  • set up rails app to handle file uploads
  • understand the how and why, of a rails model with an image attribute
@jnewman12
jnewman12 / js_debugging.md
Created June 14, 2018 08:18
WDI DTLA JS Debugging

Chrome Dev Tools

Objectives

After this lesson, students will be able to:

  • Open and describe the components of the Chrome developer tools
  • Use the developer tools to manipulate page elements (HTML/CSS)

Preparation

Before this lesson, students should already be able to:

@jnewman12
jnewman12 / carmen_san_diego.md
Created June 14, 2017 05:26
WDI SM Carmen San Diego

Use SQL to find Carmen Sandiego

Introduction

Where In The World Is Carmen Sandiego?

We're going to use what we've learned already about searching with SQL commands, and apply it to chase down and capture an elusive and world-reknowned thief, Carmen Sandiego. Follow the clues, use the interweb - write down both the SQL commands /queries you used and your answers to the clues - and figure out where Carmen's headed, so we can catch her and bring her in.

Exercise

@jnewman12
jnewman12 / active_record.md
Created June 14, 2017 05:25
WDI SM intro to active record

ActiveRecord Methods and Finders

Objectives

  • Query a model using AR methods
  • Instantiate and create a new instance of a model
  • Edit a model's attributes
  • Destroy a model

Preparation

  • Write a model that inherits from ActiveRecord
@jnewman12
jnewman12 / sql.md
Created June 14, 2017 05:22
WDI SM SQL

Intro to SQL

Objectives

After this lesson, students will be able to:

  • Create a database table
  • Insert, retrieve, update, and delete a row or rows into a database table

Preparation

@jnewman12
jnewman12 / intro_sql.md
Created June 14, 2017 05:19
SM WDI intro to SQL

Intro to Relational Data Modeling

Objectives

After this lesson, SWBAT:

  • Describe the relationship between tables, rows, and columns
  • Draw entity relationship diagrams (ERDs) with crow's foot notation for ideas for web apps
  • Describe how tables relate to each other using foreign keys
  • Explain the different relationship types – one to one, one to many, many to many
@jnewman12
jnewman12 / gh_pages.md
Last active June 8, 2017 21:19
Github pages intro

Your project on github pages

  • first, make sure you have been pushing your project to github
  • if you're in a good spot for your project, commit and push to master

gh-pages branch

  • go into your project directory in your terminal
  • run git checkout -b gh-pages
  • then run git commit -am "gh-pages branch"

What is a Callback?

A reference to executable code, or a piece of executable code, that is passed as an argument to other code.

All a callback is, is a function that takes a function as an argument.

Here is an example

function mySandwich(param1, param2, callback) {
 alert('Started eating my sandwich.\n\nIt has: ' + param1 + ', ' + param2);