This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from "jquery"; | |
const username = "ankurtaxali"; | |
$.getJSON({ | |
url: `users/${username}/likes.json`, | |
success: books => { | |
books.forEach(book => { | |
$.getJSON({ | |
url: `books/${book.id}.json`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from "jquery"; | |
const username = "ankurtaxali"; | |
$.getJSON({ | |
url: `users/${username}/likes.json`, | |
success: books => { | |
books.forEach(book => { | |
$.getJSON({ | |
url: `books/${book.id}.json`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from "jquery"; | |
const username = "ankurtaxali"; | |
$.getJSON({ | |
url: `users/${username}/likes.json`, | |
success: books => { | |
books.forEach(book => { | |
$.getJSON({ | |
url: `books/${book.id}.json`, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
id: "harry-potter", | |
}, { | |
id: "lord-of-the-rings", | |
}, { | |
id: "brave-new-world" | |
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from "jquery"; | |
const username = "ankurtaxali"; | |
$.getJSON({ | |
url: `users/${username}/likes.json`, | |
success: books => { | |
console.log(books); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"name": "Nutri-Fries with Shredded Chicken", | |
"resource": { | |
"url": "https://www.instagram.com/p/BO3JlyHgX-x/" | |
}, | |
"description": "Hi, it's Nan and Nicole from @wholesisters. Today we are sharing one of the most frequently requested meals in our family! These are a hit and a perfect addition in our Whole30 line up!", | |
"ingredients": [{ | |
"name": "Sweet Potatoes", | |
"code": "SWEET_POTATOES", | |
"qty": "2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$denominations = array(0.5, 1, 2); | |
$total = 3.6; | |
for ($i = $total; $i > 0; $i = $i - $denominations[count($denominations)-1]) { | |
while ( $i < end($denominations) ){ | |
unset($denominations[count($denominations)-1]); | |
} | |
if (empty($denominations)){ | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In late 2009, I received an email from a guy asking to meet about his new project. I was a designer at the time, and he was looking for some advice, so I agreed to meet with him at the quintessential startup meeting place in San Francisco, The Creamery. | |
“I want to make an app for browsing catalogs. It's like a fashion catalog, but you can organize and share outfits,” he said. He pulled out his iPhone and showed me a prototype that barely worked. The UI was decent but clunky; it had side-swiping navigation that only worked every few swipes. He showed me what seemed to be an endless series of women's dresses. “Nice,” I said. But I had already dismissed the idea. How on Earth would this 20-something guy in Silicon Valley reach his target market of middle aged women? And would they even want such a thing? Did they even own iPhones? I think I asked a series of questions, but I don't even remember the answers. | |
“What a stupid idea,” I thought to myself. | |
As we finished our coffees, I think he sensed my apathy, and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a list of common problems. Troubleshoot if you get desperate. | |
1. Pagination is not working. | |
No, pagination is working _fine_. It is _you_ that is not working. | |
a. declare the page variable above the loop. | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
b. use that variable in the loop | |
query_posts(array('post_type' => array('reviews', 'post'), 'paged' => $paged, 'posts_per_page' => 5)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ========================================== | |
// Welcome to hash4 - a conventional flat-file blogging system | |
// Licensed under The MIT License | |
// http://opensource.org/licenses/MIT | |
// ========================================== | |
define("ROOT_URL", "localhost/hash4/"); | |
define("SITE_TAG", "And did I say you look amazing?"); | |
?> |
NewerOlder