Skip to content

Instantly share code, notes, and snippets.

View OzzyTheGiant's full-sized avatar
👨‍💻

Oziel Perez OzzyTheGiant

👨‍💻
View GitHub Profile
@OzzyTheGiant
OzzyTheGiant / index.jsx
Created June 10, 2021 16:12
Home page for sample Shopify app
import { useState } from 'react'
import { EmptyState, Layout, Page } from '@shopify/polaris'
import { ResourcePicker } from '@shopify/app-bridge-react'
const MAIN_IMAGE = "https://cdn.shopify.com/s/files/1/0262/4071/2726/files/emptystate-files.png"
function Index() {
// State
const [modal, setModal] = useState({ open: false })
@OzzyTheGiant
OzzyTheGiant / sort.js
Last active June 4, 2021 16:49
Sorting Algorithms
const numbers = [20, 48, 7, 12, 17, 5, 69, 88, 192, 54, 45];
function quickSort(array, left, right){
if (right - left < 1) return;
let pivot = right
let index = left
while (pivot - index > 0) {
if (array[index] > array[pivot]) {