Skip to content

Instantly share code, notes, and snippets.

Jordan Garcia jordangarcia

Block or report user

Report or block jordangarcia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View async.html
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Horizons AJAX Async Example</title>
</head>
<body>
<h1>AJAX Async Example</h1>
View async.js
// prettier-ignore
const PRODUCTS_URL = "https://horizons-school-of-technology.github.io/week02/day4/examples/products.json";
function getAllProductDetails(productUrls, callback) {
let products = [];
for (let i = 0; i < productUrls.length; i++) {
let url = productUrls[i].url;
$.ajax(url, {
success: function(productDetail) {
View style.css
.title {
font-family: arial;
font-size: 46px;
font-weight: normal;
}
body {
background-color: #f7f8f9;
padding: 30px;
}
View week2day1.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Horizon's first webpage</title>
</head>
<body style="background-color: #f7f8f9; padding: 30px">
<div style="background-color: white; padding: 30px 50px; border: 1px solid #cbcbcb;">
<h1 style="font-family: arial; font-size: 46px; font-weight:normal;">
Let's learn HTML
View test.sh
# Convert all .flac files within this folder to .wav files
find . -iname "*.flac" | wc
for flacfile in `find . -iname "*.flac"`
do
ffmpeg -i $flacfile "${flacfile%.*}.wav"
done
View 99bottles.js
function ninetyNineBottles(num) {
if (num === 0) {
console.log(`No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.`);
return;
} else if (num > 2) {
console.log(`${num} bottles of beer on the wall, ${num} bottles of beer.
Take one down and pass it around, ${num - 1} bottles of beer on the wall.`);
} else if (num === 2) {
console.log(`2 bottles of beer on the wall, 2 bottles of beer.
View maharshee.js
function Person(name) {
this.name = name;
}
Person.prototype.introduce = function() {
console.log("Hello i'm " + this.name);
};
var jon = new Person('jon')
var jordan = new Person('jordan')
View objectEquivalence.js
// Warm up 6/18/2019
// Week01 Day 3
// Object Equality?
// In JS, two different objects are never actually equal
// const objA = {a: 7, b: 8}
// const objB = {a: 7, b: 8}
// objA === objB -> false
// objA == objB -> false
View App.js
import React from "react";
import logo from "./logo.svg";
import "./App.css";
import {
OptimizelyProvider,
OptimizelyExperiment,
OptimizelyVariation,
OptimizelyFeature,
createInstance
View index.html
<html>
<head>
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script src="./node_modules/@optimizely/optimizely-sdk/dist/optimizely.browser.umd.js"></script>
<script>
async function main() {
optimizelySdk.setLogLevel("debug");
const optimizely = optimizelySdk.createInstance({
sdkKey: "BsSyVRsUbE3ExgGCJ9w1to",
eventFlushInterval: 105000,
You can’t perform that action at this time.