- Get the document
Check if file is epub else reject file
Document {
_fileId: 'BQADBAADigMAAlO0OFN7fDAlnFZSHQI',
iso2 | alias | |
---|---|---|
BM | Islands of Bermuda | |
BM | The Islands of Bermuda | |
BM | Bermudas | |
BM | The Bermudas | |
BM | Somers Isles | |
BM | The Somers Isles | |
BS | Bahama | |
BS | Bahamas | |
BS | The Bahamas |
const countries = ["Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Barbuda", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Trty.", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Caicos Islands", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faro |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css"> | |
<!-- HEADER WITH NAVIGATION BAR --> | |
<header id="main-header"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4"> | |
<h1><a href="#">LeviClan</a></h1> |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
In my project folder I have 2 folders client and server, I only want get the changes in my server folder from master to prod branch
git checkout prod
- Go to the branch with the oldest changesgit merge --no-commit --no-ff master
- Merge with the branch with the latest changes. Read Moregit reset -- client*
- Unstage any changes from client folder, I only want to server folder. Read Moregit checkout -- client*
- Remove any changes from client folder, I only want to server folder.git clean -n
- View all unstaged files. Read Moregit clean -fd
- Remove all unstaged folder, if you dont want to remove all then you should add those with git add
and then run this command. Read MoreWhen querying your database in Sequelize, you'll often want data associated with a particular model which isn't in the model's table directly. This data is usually typically associated through join tables (e.g. a 'hasMany' or 'belongsToMany' association), or a foreign key (e.g. a 'hasOne' or 'belongsTo' association).
When you query, you'll receive just the rows you've looked for. With eager loading, you'll also get any associated data. For some reason, I can never remember the proper way to do eager loading when writing my Sequelize queries. I've seen others struggle with the same thing.
Eager loading is confusing because the 'include' that is uses has unfamiliar fields is set in an array rather than just an object.
So let's go through the one query that's worth memorizing to handle your eager loading.
// npm i aws-sdk | |
const AWS = require('aws-sdk') | |
// npm i uuid | |
const uuidv4 = require('uuid/v4'); | |
let s3 = null; | |
if (!s3) { | |
// Get these credential from the file you downloaded in your console | |
// https://help.bittitan.com/hc/en-us/articles/115008255268-How-do-I-find-my-AWS-Access-Key-and-Secret-Access-Key |
// 1. Open your google spreadsheet | |
// 2. Tools > Script editor | |
// 3. Copy the code and paste in the editor. | |
// 4. Save the file and run it (you may need to give permissions) | |
function exportSheetAsJSON() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); | |
var numCols = rows.getNumColumns(); |