Skip to content

Instantly share code, notes, and snippets.

interview-project

Bookshout interview project.

Assignment: Using the GitHub Search API, implement a basic web app that queries repositories based on user input and displays the following data / options:

Business Requirements:

  • A list of the results along with the programming language for that repo
  • A filtering of the results based on the languages returned (can use AJAX or make separate requests)
  • Sort by stars in either asc or desc order
  • Pagination, if available
{978}{1}{001}{000001}{0}
ISBN divided in 5 parts:
1. 978 is a constant for digital books.
2. Is country code 1 or 0 for us, lets just choose 1.
3. Publisher code https://en.wikipedia.org/wiki/List_of_group-1_ISBN_publisher_codes, looks like 001 is unlikely to be ever taken.
4. Product ID -> How do we generate this?
5. Check digit -> can be any digit we decide to use.
{
available:true,
available_until:null,
copyable:false,
created_at:"2014-03-18T15:44:17Z",
encrypted:true,
epub_checksum:"58b0e59a2f24eebd2bb604607179ab66",
epub_file_size:1153321,
excerpt:null,
id:615456,
@arturo-c
arturo-c / wordpress diff
Created March 4, 2015 19:39
wordpress diff
diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt
old mode 100755
new mode 100644
diff --git a/content.php b/content.php
old mode 100755
new mode 100644
diff --git a/footer.php b/footer.php
index b3a7cfc..a1ce5ee 100644
--- a/footer.php
+++ b/footer.php
@arturo-c
arturo-c / gist:286d8951112b3084a637
Created January 26, 2015 14:38
faceted_search return
{
"current_page": 1,
"per_page": 20,
"total_entries": 391,
"total_pages": 20,
"items": [
{
"available": true,
"available_until": null,
"copyable": false,
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
location ~* /(blog|about|contact|services|team|third-party|bookshout-premium|bookshout-marketing|success-stories|author- platform|bookshout-bloggers|news|sitemap.xml|sitemap-*) {
try_files $uri $uri/ @frontend;
add_header Access-Control-Allow-Origin https://wordpress-qa.bookshout.com;
}
@arturo-c
arturo-c / Vagrantfile
Last active August 29, 2015 14:07
Vagrantfile Bookshout
Vagrant.configure('2') do |config|
config.vm.box = 'puppet-3-trusty'
config.vm.network 'private_network', ip: '192.168.213.2'
#config.dns.tld = 'dev'
#config.dns.patterns = [/^.*bookshout.dev$/]
# Mount Puppet repository.
config.vm.synced_folder 'Puppet', '/etc/puppet', create: true, owner: 'vagrant', group: 'vagrant'
# Mount bookshout and share folder, substite {your_mac_path} with the real path to the app.
config.vm.synced_folder '/{your_mac_path}/bookshout', '/web/bookshout', :nfs => { :mount_options => ['dmode=777','fmode=777'] }
diff --git a/www/includes/module.inc b/www/includes/module.inc
index e4a790a..3145001 100644
--- a/www/includes/module.inc
+++ b/www/includes/module.inc
@@ -523,7 +523,7 @@ function module_invoke() {
return call_user_func_array($function, $args);
}
else {
- return array();
+ return NULL;
diff --git a/www/includes/module.inc b/www/includes/module.inc
index 58dfac1..6e41ba3 100644
--- a/www/includes/module.inc
+++ b/www/includes/module.inc
@@ -446,7 +446,8 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE, $write_cache =
if ($reset) {
$implementations = array();
$verified = array();
- cache_set('module_implements', array(array(), array()));
+ cache_set('module_implements', array());