Skip to content

Instantly share code, notes, and snippets.

View farishkash's full-sized avatar

Farish Kashefinejad farishkash

View GitHub Profile
const apiKey =
"CYEw8PzXruGqaduiHtA8V1DXfojHcpkoJzK7wg7e1BzkGsFxOb2A55NHoTPf0I3lrsbrDQLSlp3NGWqgkwyGZLpp74hv9VCQ5rNb0wCodAxTPFAxCkVkoMuksH5eW3Yx";
const Yelp = {
search(term, location, sortBy) {
console.log(term, location, sortBy);
console.log(
`https://cors-anywhere.herokuapp.com/https://api.yelp.com/v3/businesses/search?term=${term}&location=${location}&sort_by=${sortBy}`
);
return fetch(
`https://cors-anywhere.herokuapp.com/https://api.yelp.com/v3/businesses/search?term=${term}&location=${location}&sort_by=${sortBy}`,
function isLetter(str) {
return str.length === 1 && str.match(/[a-z]/i);
}
function hasUppercase(input) {
for (var i = 0; i < input.length; i++) {
if (isLetter(input[i]) == input[i].toUpperCase()) {
return true;
}
}
<!DOCTYPE html>
<html>
<head>
<title>Dasmoto's Arts & Crafts</title>
<link href="./resources/css/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>Dasmoto's Arts & Crafts</h1>
@farishkash
farishkash / gist:528b525e147ebf739e28243f777b4b8f
Created April 27, 2017 23:59
Linux commands to install Ruby on Rails on Windows 10
Initial linux update
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
rbenv setup
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc