Skip to content

Instantly share code, notes, and snippets.

View tsengvn's full-sized avatar

Hien Ngo tsengvn

  • Ho chi minh city
View GitHub Profile
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface TrackingSession {
@NonNull String pageType();
@NonNull String pageSection() default "";
}
@tsengvn
tsengvn / record.sh
Created December 5, 2018 07:53
Record android device and convert to gif script
pullAndConvert() {
rm record.gif >/dev/null 2>&1
echo "Pull record..."
adb pull /sdcard/record.mp4 ./record.mp4 >/dev/null 2>&1
echo "Converting..."
ffmpeg -i record.mp4 -filter:v "setpts=1.0*PTS" -vf scale=360:-1 record.gif -loglevel panic
rm record.mp4
echo "Output: $PWD/record.gif"
echo "Done"
public static final class Hero {
@NotNull
private final String name;
@NotNull
private final String weapon;
@NotNull
public final String getName() {
return this.name;
}

Keybase proof

I hereby claim:

  • I am tsengvn on github.
  • I am nmhien88 (https://keybase.io/nmhien88) on keybase.
  • I have a public key ASA4IYeta-JazppwKlk7gnKf4P1g4bLbx4CwFWcV5fgFLAo

To claim this, I am signing this object:

package com.tsengvn.pcs.ui.main
import android.Manifest
import android.app.Activity
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.provider.MediaStore
import android.support.v7.app.AppCompatActivity
import android.util.Log
def getCommitId = { ->
def hashStdOut = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--short", "HEAD"
standardOutput = hashStdOut
}
return hashStdOut.toString().trim()
}
def getVersionName = { ->
def hashStdOut = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--short", "HEAD"
standardOutput = hashStdOut
}
def buildNumberStdOut = new ByteArrayOutputStream()
exec {
commandLine 'echo', "$BUILD_NUMBER"
@tsengvn
tsengvn / mobile_challenges.md
Last active December 10, 2016 06:03
wz mobile challenges

Imgur Challenge

This is a guide for presenting the challenge to the candidate, not a document to give to the candidate.

Overview

Create an application that displayed images from Imgur services http://imgur.com/

Critical Points

  • Display images as a list