Skip to content

Instantly share code, notes, and snippets.

View parcool's full-sized avatar
🐂
Empty...

Parcool Tan parcool

🐂
Empty...
View GitHub Profile
@nalitzis
nalitzis / gist:2857519
Created June 2, 2012 09:34
Audio record
public static final int FREQUENCY = 44100;
public static final int CHANNEL_CONFIGURATION = AudioFormat.CHANNEL_CONFIGURATION_MONO;
public static final int AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT;
private void recordSound(){
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/"+RECORDED_FILENAME);
// Delete any previous recording.
if (file.exists())
@dral3x
dral3x / gist:5495295
Last active November 16, 2017 01:25
Script for compiling FFMpeg for Android projects on Mac OS. Please adjust NDK, PLATFORM and PREBUILD variable before run it
#!/bin/bash
######################################################
# Usage:
# put this script in top of FFmpeg source tree
# ./build_android
#
# It generates binary for following architectures:
# ARMv6
# ARMv6+VFP
# ARMv7+VFPv3-d16 (Tegra2)
public class BackgroundVideoRecorder extends Service implements SurfaceHolder.Callback {
private WindowManager windowManager;
private SurfaceView surfaceView;
private Camera camera = null;
private MediaRecorder mediaRecorder = null;
@Override
public void onCreate() {
@lienjun
lienjun / NumUtils.java
Created June 1, 2017 10:06
数字转汉字工具类
import java.util.Arrays;
import java.util.List;
/**
* 数字转汉字工具类
*
* @author arron
* @date 2015年7月21日 下午4:14:16
* @version 1.0
* @see https://github.com/Arronlong/commonutils/blob/master/src/main/java/com/arronlong/common/util/num/NumUtils.java
@AkshayChordiya
AkshayChordiya / ApiResponse.java
Last active February 3, 2024 01:47
LiveData adapter for Retrofit
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.util.ArrayMap;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@naveenkrdy
naveenkrdy / AdobeAMDFix.md
Last active November 14, 2024 10:53
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password when asked).