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/sh | |
a=0 | |
while [ $a -lt 100000 ] | |
do | |
curl -X POST \ | |
http://localhost:3000/auth/login \ | |
-H 'Cache-Control: no-cache' \ | |
-H 'Content-Type: application/json' \ | |
-H 'Postman-Token: d268322e-137b-485d-9cc8-ae1af3121a0b' \ |
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: | |
app: | |
container_name: app | |
build: . | |
volumes: | |
- .:/app | |
ports: | |
- "3000:3000" | |
networks: |
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 node:8.9.2 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY package.json /usr/src/app/ | |
RUN apt-get update && apt-get install vim -y && npm install -g yarn typescript nodemon && yarn | |
COPY . /usr/src/app | |
EXPOSE 3000 | |
CMD [ "yarn", "dev" ] |
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 _ from 'lodash'; | |
function calculateDV(barcode) { | |
let brokeParts = _.chunk(barcode, 11); | |
if (barcode.startsWith(8)) { | |
return brokeParts | |
.map(i => { | |
let part = i.join(''); | |
console.log(part); |
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/sh | |
NUMS="1 2 3 4 5 6 7" | |
for NUM in $NUMS | |
do | |
Q=`expr $NUM % 2` | |
if [ $Q -eq 0 ] | |
then | |
echo "Number is an even number!!" |
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/sh | |
count=0 | |
url='http://165.227.125.140:8000/api/v1/events/?format=json&limit=6' | |
while [ $count -lt 1000000 ] | |
do | |
curl -X GET \ | |
$url \ | |
-H 'cache-control: no-cache' \ |
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
//add this in: /hooks/before_prepare | |
var chalk = require('chalk'); | |
var exec = require('child_process').exec; | |
exports.run = copyPushIcon; | |
function copyPushIcon() { | |
var rootdir = process.argv[2] + '/resources/android/push_icons/'; |
NewerOlder