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
getFilesOfType() { | |
find . -name "$1" -not -path "./node_modules/*" -not -path "./dist/*" -not -path "./reports/*" | |
} | |
getEs5JSBuildFiles() { | |
du -chk ./dist/*es5*.js | grep total | |
} | |
getEs2015JSBuildFiles() { | |
du -chk ./dist/*es2015*.js | grep total |
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
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "NewsArticle", | |
"mainEntityOfPage": "https://www.theverge.com/2018/8/27/17785594/apple-iphone-xs-september-launch-three-new-devices-rumors", | |
"headline": "Apple to launch three new iPhones, Watch with larger screen, updated iPad Pros, says Bloomberg", | |
"description": "Apple is expected to launch three new iPhones in September, according to the latest rumors and supply chain leaks. A new report from Bloomberg says there’ll be an upgraded iPhone X, a version with a larger screen, and a cheaper handset with colorful variants and an LCD display. ", | |
"speakable": { | |
"@type": "SpeakableSpecification", | |
"xpath": [ |
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
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@id": "https://www.apple.com/#organization", | |
"@type": "Organization", | |
"name": "Apple", | |
"url": "https://www.apple.com/", | |
"logo": "https://www.apple.com/ac/structured-data/images/knowledge_graph_logo.png?201709101434", | |
"contactPoint": [ | |
{ |
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 * as awilix from "awilix"; | |
import * as dotenv from "dotenv"; | |
import * as serverless from "serverless-http"; | |
import DynamoDbStorage from "../shared/storage/dynamoDb"; | |
import createContainer from "./container"; | |
import Server from "./server/server"; | |
dotenv.config(); | |
const container = createContainer({ |
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 * as awilix from "awilix"; | |
import * as dotenv from "dotenv"; | |
import DynamoDbStorage from "../shared/storage/dynamoDb"; | |
import TranslationsStorage from "../shared/translations/translations"; | |
import createContainer from "./container"; | |
import GoogleSheets from "./google/sheets"; | |
import ITransformer from "./transformer/transformer"; | |
dotenv.config(); |
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
service: serverless-translations | |
plugins: | |
- serverless-plugin-typescript | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
stage: dev | |
region: us-east-1 |
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 | |
$operation = File::openForRead(join(DIRECTORY_SEPARATOR, [__DIR__, 'credit_cards.txt'])); | |
if ($operation->isSuccessful) { | |
return CreditCardNumberExtractor::createFromHandler($operation->payload); | |
} | |
/* ... */ |
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 | |
$handler = @fopen(join(DIRECTORY_SEPARATOR, [__DIR__, 'credit_cards.txt']), "r"); | |
if ($handler) { | |
return CreditCardNumberExtractor::createFromHandler($handler); | |
} | |
/* ... */ |
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 | |
final class ResultObject | |
{ | |
public $isSuccessful; | |
public $payload = null; | |
private function __construct(bool $isSuccessful, $payload = null) | |
{ | |
$this->isSuccessful = $isSuccessful; | |
$this->payload = $payload; |
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 | |
if ($response->getStatusCode() >= 400) { | |
$code = $this->extractErrorCode($response->getBody()); | |
switch ($code) { | |
case FailReasons::NO_TAGS: | |
$msg = 'The document has not enough signature tags'; | |
break; | |
//... |
NewerOlder