This file contains hidden or 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
function compare(newField, oldField) { | |
var isClean = true; | |
for (var property in newField) { | |
if (!newField.hasOwnProperty(property)) { continue; } | |
if(property == 'options') { | |
const newOptions = newField.options; | |
const oldOptions = oldField.options; |
This file contains hidden or 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
// Example of how to insert a record that includes a new association to be created with it | |
// assumes that sequelize and the associations have already been configured earlier. | |
var data = { | |
title: "Post title", | |
description: "Post description", | |
categories: [{ | |
title: "General", | |
description: "The default category." | |
}] |
This file contains hidden or 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
# Merge changes from one branch to another | |
git checkout master | |
git merge origin/hotfix | |
# Reset local to match the server | |
git fetch --all |
This file contains hidden or 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
CREATE VIEW "view_entries" AS | |
-- Approved Entries | |
SELECT | |
"entries"."id", | |
"entries"."awardId", | |
"entries"."categoryId", | |
"entries"."userId", | |
CASE |
This file contains hidden or 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 Bind from './sql-bind-incrementor.js' | |
const bind = new Bind() | |
const limit = 10 | |
const queryValues = ['id_value', 'order_id_value'] | |
const item_ids = ['aaa', 'bbb', 'ccc'] | |
let sql = ` |
This file contains hidden or 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
# Script for building and exporting iOS project | |
workspace_name=xxxx | |
scheme_name=xxxx | |
current_dir=$(dirname $0) | |
root_dir=$current_dir/.. | |
archive_path=$root_dir/build/ios/archive/$workspace_name.xcarchive | |
export_path=$root_dir/build/ios/export | |
echo "Recreating build folder" |
OlderNewer