Skip to content

Instantly share code, notes, and snippets.

@nickwph
nickwph / aosp-centos-7-building-guide.md
Last active October 13, 2021 02:42
CentOS 7 AOSP Building Guide

CentOS 7 AOSP Building Guide

install libraries

# fetch source
sudo yum install git
sudo yum install wget
# to compile
sudo yum install java-1.7.0-openjdk
@nickwph
nickwph / install-sublime-text-3.sh
Last active October 12, 2015 18:16
Sublime Text 3 on CentOS / RHEL
#!/bin/sh
# run this to install
# sudo su install-sublime-text-3.sh
# modify this if you need another version or or architecture
URL="http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3083_x64.tar.bz2"
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
# node structure
class Node:
value = None
left = None
right = None
# constructor
def __init__(self, value, left=None, right=None):
self.value = value
self.left = left
import java.util.Scanner;
public class Solution1 {
public static void main(String[] args) {
try {
// read in matrix
Scanner scanner = new Scanner(System.in);
int length = Integer.parseInt(scanner.nextLine());
int[][] matrix = new int[length][length];
for (int i = 0; i < length; i++) {
@nickwph
nickwph / build-jacoco.gradle
Created May 26, 2015 23:50
Gradle build file to set up variables for JaCoCo.
/**
* Created by Nicholas Wong <nickwph@yahoo-inc.com>.
* Gradle build file to set up variables for JaCoCo.
* The following tasks will be created in normal circumstance.
*
* - Create JaCoCo HTML and XML Reports
* jacocoDebug
* jacocoRelease
*
* - Open JaCoCo HTML Report in Mac OSX
@nickwph
nickwph / repo-commands.sh
Created May 7, 2015 16:35
Nice Repo Commands
# update repo version
repo selfupdate --no-repo-verify
# reset all repos
repo forall -vc "git reset --hard"
# clean and delete unstaged changes
repo forall -vc "git clean -df"
# pull all repos