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
FROM gradle:latest | |
# FROM openjdk:8-jre-alpine | |
USER root | |
# RUN apk --no-cache add curl | |
ENV SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" \ | |
ANDROID_HOME="/usr/local/android-sdk" \ | |
ANDROID_VERSION=28 \ | |
ANDROID_BUILD_TOOLS_VERSION=29.0.2 | |
# Download Android SDK | |
RUN mkdir "$ANDROID_HOME" .android \ |
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
#!/bin/bash | |
COMMAND=$1 | |
RESET="\033[0m" | |
BOLD="\033[1m" | |
YELLOW="\033[38;5;11m" | |
echo "running in $COMMAND shell mode" | |
while read -r -p "$(echo -e $BOLD$YELLOW"$COMMAND>"$RESET)" | |
do | |
if [ "$REPLY" == "quit" ]; then | |
echo "Quiting $COMMAND shell" |
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
/** | |
* Fake read file function | |
* @param {*} name : name of file to read | |
* @param {data} cb : content of the file | |
*/ | |
const readFile = (type, name, cb) => { | |
const time = Math.floor(Math.random() * 10 * 1000); | |
const fn = cb.bind(null, `{ type: ${type}, name: ${name}, data: "${name + '_' + time}ms"}`); | |
console.log(`fetching file: ${name} of ${type} in ${time}ms...`) | |
setTimeout(fn, time) |
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
## Testing | |
https://www.sitespeed.io/ | |
https://docs.cypress.io | |
## Guideline | |
https://github.com/airbnb/javascript/tree/master/react | |
## Performace | |
https://building.calibreapp.com/debugging-react-performance-with-react-16-and-chrome-devtools-c90698a522ad | |
https://www.keycdn.com/blog/react-performance |
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
## Networking | |
https://loopj.com/android-async-http/ | |
https://github.com/koush/ion | |
https://github.com/square/okhttp | |
https://github.com/square/retrofit | |
## Images: | |
https://github.com/bumptech/glide | |
https://github.com/koush/ion | |
http://square.github.io/picasso/ |
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
"use strict"; | |
var oracledb = require('oracledb'); | |
var Promise = require('bluebird'); | |
var _ = require('lodash'); | |
var EventEmitter = require('events'); | |
var util = require('util'); | |
var async = require('async'); | |
var NodeDBConnection = require('./NodeDBConnection'); | |
var log ; | |
function validateConfig(config) { |
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
/** | |
* Created by intelligrape on 17/7/14. | |
*/ | |
Function.prototype.inherits = function (parent) { | |
"use strict"; | |
this.prototype = new parent(); | |
this.constructor = this; | |
this.prototype.parent = parent.prototype | |
} | |
function User(name) { |
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
//Problem to sort and get port with minimum bandwith, based on switch priority(Select same switch first) | |
var ports = [{ | |
id: 1, | |
switch: 'a', | |
availableBandWidth: 500 | |
},{ | |
id: 2, | |
switch: 'b', | |
availableBandWidth: 10 | |
},{ |
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
/* | |
* | |
The MIT License (MIT) | |
Copyright (c) 2014 deepakshrma | |
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 |
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
Show hidden characters
{ | |
"env": { | |
"node": true | |
}, | |
"globals":{ | |
"anyglobal":true | |
}, | |
"extends": "eslint:recommended", | |
"rules": { | |
"accessor-pairs": "error", |