Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
Initialized native services in: /usr/local/google/home/jingwen/.gradle/native
Removing daemon from the registry due to communication failure. Daemon information: DaemonInfo{pid=93713, address=[cd576c87-a5c3-4e22-98e8-cbc3f6d741bf port:39205, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1525194598789, context=DefaultDaemonContext[uid=c4f8c627-92e7-4337-ab9d-2ed56e9d2341,javaHome=/usr/local/buildtools/java/jdk8-google-v7-64,daemonRegistryDir=/usr/local/google/home/jingwen/.gradle/daemon,pid=93713,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]}
Removing 0 daemon stop events from registry
Previous Daemon (73687) stopped at Tue May 01 13:07:12 EDT 2018 by user or operating system
Previous Daemon (92142) stopped at Tue May 01 13:08:26 EDT 2018 by user or operating system
Previous Daemon (93524) stopped at Tue May 01 13:09:51 EDT 2018 by user or operating system
Previous Daemon (93713) stopped at
# https://github.com/googlesamples/android-testing#experimental-bazel-support
---
platforms:
ubuntu1404:
build_targets:
- "//ui/..."
test_flags:
- "--spawn_strategy=local" # Required due to unified launcher bug
- "--local_test_jobs=8" # Run at most 8 tests (= emulators) in parallel
test_targets:
@jin
jin / setup.md
Last active April 11, 2018 07:19
Setup for Bazel's Android Instrumentation Tests on CI (Google Compute Engine)

Bazel Android Team

Setup Instructions for Android Instrumentation Tests with Bazel

Test project: https://github.com/googlesamples/android-testing

Tested with Bazel version 0.12.0rc2

Tested on fresh GCE Ubuntu 14.04 and 16.04 images with nested KVM support

@jin
jin / BUILD.bazel
Created March 16, 2018 17:24
grep "cc_toolchain(" BUILD.bazel -A 30 -B 5
################################################################
# aarch64-linux-android-clang5.0.300080-gnu-libstdcpp
################################################################
cc_toolchain(
name = "aarch64-linux-android-clang5.0.300080-gnu-libstdcpp",
all_files = ":aarch64-linux-android-clang5.0.300080-gnu-libstdcpp-all_files",
ar_files = ":aarch64-linux-android-clang5.0.300080-gnu-libstdcpp-all_files",
as_files = ":aarch64-linux-android-clang5.0.300080-gnu-libstdcpp-all_files",
@jin
jin / hackerrank.ml
Last active July 17, 2019 14:57
OCaml HackerRank template code
(* Enter your code here. Read input from STDIN. Print output to STDOUT *)
let () =
let ary = ref [] in
try ( while true do ary := (!ary@[read_int()]) done )
with End_of_file ->
begin
List.fold_left (fun i x ->
if (i mod 2 != 0) then (print_int(x); print_string("\n"); (i + 1))
else (i + 1)
@jin
jin / islands.rb
Last active December 15, 2015 07:24
islands.rb
# find the number of islands (1's) in a n x m matrix
# islands are only connected by cells in the up, down, left and right directions.
input = "
1 1 1 1 1 \n
0 0 1 0 0 \n
0 0 0 0 0 \n
1 1 0 0 1 \n
1 0 0 0 1 \n
"
let rec read_lines () =
try let line = read_line () in
int_of_string (line) :: read_lines()
with
End_of_file -> []
let f n arr = (*Complete this function*)
let () =
let n::arr = read_lines() in
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-fugitive'
Plug 'Raimondi/delimitMate'
Plug 'tpope/vim-ragtag'
" Runs code through external parser to check for syntatic errors
Plug 'scrooloose/syntastic'
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
require 'nokogiri'
require 'httparty'
require 'concurrent'
require 'pp'
class HWZRequest
def initialize
@host = "http://forums.hardwarezone.com.sg"
end
@jin
jin / vivian_balakrishnan_sudoku.js
Last active February 14, 2016 03:59
@VivianBalakrishnan's translation of Lee Hsien Loong's Sudoku solver.
/****************************************************************
* Sudoku Solver
*
* Translated into Javascript from original code in C++
* by Lee Hsien Loong
* The MIT License (MIT)
* Copyright (c) 2015 Vivian Balakrishnan
*
*
****************************************************************/