Set up project:
mkdir project
cd project
npm init -y
#!/usr/bin/env ruby | |
require 'highline/import' | |
require 'nokogiri' | |
# i suggest looking at this folder and seeing your app prefix ¯\_(ツ)_/¯ | |
$gradle_properties = File.join(File.dirname(__FILE__), "..", "..", "gradle.properties") | |
$app_directory = "./<App Parent Directory>" | |
$app_name_prefix = "<Prefix for final apk e.g. uber-release->" | |
$splash_screen_location = "co.kaush.instashop/co.kaush.instashop.SplashActivity" |
import {FormControl} from '@angular/forms'; | |
export class EmailValidator { | |
static isValid(control: FormControl){ | |
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(control.value); | |
if (re){ | |
return null; |
{ | |
"host": "gateway.marvel.com", | |
"basePath": "/", | |
"schemes": [ | |
"http" | |
], | |
"swagger": "2.0", | |
"info": { | |
"title": "gateway.marvel.com", | |
"version": "Cable" |
{ | |
"env": { | |
"node": true, | |
"es6": true | |
}, | |
"ecmaFeatures": { | |
"arrowFunctions": true, | |
"blockBindings": true, | |
"classes": true, | |
"defaultParameters": true, |
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |
// These window.navigator contain language information | |
// 1. languages -> Array of preferred languages (eg ["en-US", "zh-CN", "ja-JP"]) Firefox^32, Chrome^32 | |
// 2. language -> Preferred language as String (eg "en-US") Firefox^5, IE^11, Safari, | |
// Chrome sends Browser UI language | |
// 3. browserLanguage -> UI Language of IE | |
// 4. userLanguage -> Language of Windows Regional Options | |
// 5. systemLanguage -> UI Language of Windows | |
var browserLanguagePropertyKeys = ['languages', 'language', 'browserLanguage', 'userLanguage', 'systemLanguage']; |
'use strict'; | |
var should = require('should'); | |
var app = require('../../app'); | |
var request = require('supertest')(app); | |
describe('GET /api/incidents', function() { | |
it('should require authorization', function(done) { | |
request |
# Copyright © 2014 Jan Ehrhardt | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |