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
| allprojects { | |
| repositories { | |
| jcenter() | |
| maven { url "http://192.168.1.124:8081/repository/maven-releases/" } | |
| } | |
| } |
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
| apply plugin: 'maven' | |
| uploadArchives { | |
| repositories { | |
| mavenDeployer { | |
| repository(url: "http://192.168.1.124:8081/repository/maven-releases/") { | |
| authentication(userName: "admin", password: "admin123") | |
| pom.groupId = "com.beesightsoft.caf" | |
| pom.artifactId = "rx" | |
| pom.version = '2.0.0' |
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
| export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home | |
| export PATH=$JAVA_HOME/bin:$PATH |
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
| package com.nhancv.training; | |
| import com.nhancv.training.main.MainPresenter; | |
| import com.nhancv.training.main.MainView; | |
| import com.nhancv.training.main.ObjectBus; | |
| import org.greenrobot.eventbus.EventBus; | |
| import org.junit.Assert; | |
| import org.junit.Before; | |
| import org.junit.Test; |
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
| public static void genBitmapFile(Context context, View targetView, int num) { | |
| int sizePixels = 1080; | |
| Bitmap result = Bitmap.createBitmap(sizePixels, sizePixels, Bitmap.Config.ARGB_8888); | |
| Canvas c = new Canvas(result); | |
| // measure view first | |
| int sizeSpec = View.MeasureSpec.makeMeasureSpec(sizePixels, View.MeasureSpec.EXACTLY); | |
| targetView.measure(sizeSpec, sizeSpec); |
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
| public static File saveBitmapToFile(Context context, String filename, Bitmap bitmap) { | |
| File f = new File(context.getCacheDir(), filename); | |
| Log.e(TAG, "saveBitmapToFile: " + f.getAbsolutePath()); | |
| try { | |
| f.createNewFile(); | |
| //Convert bitmap to byte array | |
| ByteArrayOutputStream bos = new ByteArrayOutputStream(); | |
| bitmap.compress(Bitmap.CompressFormat.PNG, 0 /*ignored for PNG*/, bos); | |
| byte[] bitmapdata = bos.toByteArray(); |
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
| group 'com.beesightsoft.kotlin' | |
| version '1.0-SNAPSHOT' | |
| buildscript { | |
| ext.kotlin_version = '1.1.60' | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { |
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
| #!/usr/bin/env bash -e | |
| _PROJECT_NAME=$(cat package.json | grep name | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') | |
| _INFOPLIST_DIR="ios/${_PROJECT_NAME}/Info.plist" | |
| _PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') | |
| # Set BUILD_NUMBER to the value 1 only if it is unset. | |
| : ${BUILD_NUMBER=$(expr $(git log -1 --pretty=format:%ct) / 3600)} |
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
| import groovy.json.JsonSlurper | |
| def getNpmVersion() { | |
| def inputFile = new File("../package.json") | |
| def packageJson = new JsonSlurper().parseText(inputFile.text) | |
| return packageJson["version"] | |
| } | |
| def getCommitTime() { | |
| return (Integer) (Long.valueOf('git log -1 --pretty=format:%ct'.execute().getText().trim())/3600) | |
| } |
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
| const express = require('express') | |
| const app = express() | |
| app.get('/', (req, res) => { | |
| var connectionInterrupt = false; | |
| var str = "a hihi do ngoc." + new Date().getTime() | |
| console.log("Process: " + str); | |
| req.connection.on('close',function(){ |
OlderNewer