Skip to content

Instantly share code, notes, and snippets.

View joelrojo's full-sized avatar

J03L R0J0 joelrojo

View GitHub Profile
@joelrojo
joelrojo / extractTextFromJSON.ts
Last active April 7, 2023 06:03
Using TipTap in react-native with react-native-pell-rich-editor
// extracts text string from prosemirror json object
import { schema } from '~app/utils/prosemirror'
const extractTextFromJSON = json => {
let text = ''
schema.nodeFromJSON(json).descendants(node => {
if (node.isText) {
text += `${node.text} `
}
})
@joelrojo
joelrojo / algorithms_data_structures.md
Last active October 27, 2022 16:14
Resources on Algorithms and Data Structures

Data Structures And Algorithm Lessons

This is a great resource for learning data structures and algorithms. It's set up like the phase challenges that you're used to doing and have great, concise explanations of all the concepts.

Or, if you learn better via video, this course:

Here are short explanations for Mergesort and Quicksort that are readable:

@joelrojo
joelrojo / technical_interview.md
Last active October 25, 2022 02:20
Collection of resources for technical interviews, specifically Javascript and Ruby
@joelrojo
joelrojo / ajax_cheat_sheet.md
Last active August 5, 2024 11:56
AJAX 101 cheat sheet

#AJAX

What is AJAX

"AJAX an acronym for asynchronous JavaScript and XML is a group of interrelated web development techniques used on the client-side to create asynchronous web applications. With Ajax, web applications can send data to, and retrieve data from, a server asynchronously (in the background) without interfering with the display and behavior of the existing page. Data can be retrieved using the XMLHttpRequest object. Despite the name, the use of XML is not required (JSON is often used instead), and the requests do not need to be asynchronous." - wikipedia

AJAX with jQuery

jQuery provides a $.ajax() method with a set of options for sending requests and callback methods to handle responses.

  • Here is the most basic $.ajax() request that does not send any data. It will be handled by the post '/trips' route on the server. You can choose any of the http request verbs for the type parameter (get, post, put, delete)
@joelrojo
joelrojo / design_resources.md
Last active May 24, 2022 10:25
Design Resources
@joelrojo
joelrojo / ssh_heroku.md
Created August 22, 2016 16:23
SSH + Heroku tips