const assert = require('assert')
const BLUEBIRD = require('bluebird')
const nameAsync1 = async (name) => name
const nameAsync2 = (name) => Promise.resolve(name)
const nameAsync3 = (name) => BLUEBIRD.resolve(name)
const nameSync = (name) => name
const isPromise1 = (value) => Promise.resolve(value) === value
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function countdown(time) { | |
setTimeout( ()=> { | |
if(!time && time == '00:00') { | |
return | |
} |
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
FROM ubuntu:xenial | |
LABEL Description="PHP-FPM v7.2" | |
LABEL Version="1.0.0" | |
ENV TIME_ZONE America/Sao_Paulo | |
RUN apt-get update -yqq \ | |
&& apt-get install -yqq \ | |
ca-certificates \ |
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
#!/usr/bin/sh | |
pr() { | |
git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD) | |
hub pull-request -b master -m $@ | |
} | |
alias new-feature="git reset --hard HEAD && git checkout master && git pull origin master && git checkout -b $@" |
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
curl -X POST \ | |
-H 'Content-Type: application/json' \ | |
-d '{ | |
"state": "failure", | |
"target_url": "https://example.com/build/status", | |
"description": "The build failed!", | |
"context": "continuous-integration/jenkins" | |
}' \ | |
"https://api.github.com/repos/${OWNER}/${REPOSITORY}/statuses/${SHA_PROVIED}?${ACCESS_TOKEN}" |
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 | |
namespace YOUR_NAME_SPACE; | |
use Illuminate\Foundation\Testing\TestResponse; | |
use Illuminate\Http\Response; | |
trait ArrayAssertTrait | |
{ | |
public function assertArrayStructure($resultData = null, array $structure = null) |
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
--- | |
version: "2" | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2 | |
container_name: sales_sync_elasticsearch | |
ports: | |
- "9200:9200" | |
environment: | |
discovery.type: "single-node" |
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
#!/bin/bash | |
docker run \ | |
--volume=/var/run/docker.sock:/var/run/docker.sock \ | |
--volume=data:/data \ | |
--env=DRONE_GIT_ALWAYS_AUTH=false \ | |
--env=DRONE_GITLAB_SERVER=localhost \ | |
--env=DRONE_GITLAB_CLIENT_ID=CLIENT_ID \ | |
--env=DRONE_GITLAB_CLIENT_SECRET=CLIENT_SECRET \ | |
--env=DRONE_RUNNER_CAPACITY=2 \ |
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
FROM ubuntu:18.04 | |
RUN apt-get update | |
RUN apt-get install -y unzip | |
RUN apt-get install -y curl | |
RUN curl -O -L https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip | |
RUN unzip terraform_0.11.13_linux_amd64.zip | |
RUN mv terraform /usr/local/bin |
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
version: '2.2' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.0 | |
container_name: elasticsearch | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: |
OlderNewer