Skip to content

Instantly share code, notes, and snippets.

@illuzor
illuzor / convert_mp3_to_aac.sh
Created December 13, 2025 10:50
Simple script to convert mp3 files to aac with size limit (generated by chatgpt)
#!/bin/bash
LIMIT_MB=199
LIMIT_BYTES=$((LIMIT_MB * 1024 * 1024))
JOBS=8
mkdir -p out
convert_file() {
local f="$1"
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
/**
* Copy from https://blog.csdn.net/fjh658/article/details/12869073
*/
public class AmrLength {
public synchronized static long getAmrDuration(File file) throws IOException {
@illuzor
illuzor / .gitlab-ci.yml
Last active November 28, 2025 22:21
Config for gitlab ci android with unit tests and instrumented tests
image: ubuntu:22.04
variables:
ANDROID_COMPILE_SDK: "33"
ANDROID_BUILD_TOOLS: "33.0.2"
EMULATOR_IMAGE: "24"
SDK_TOOLS: "9477386" # from https://developer.android.com/studio/#command-tools
before_script:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="define_int_commonsio" translatable="false" />
<string name="library_commonsio_author" translatable="false">The Apache Software Foundation</string>
<string name="library_commonsio_authorWebsite" translatable="false">http://apache.org</string>
<string name="library_commonsio_libraryName" translatable="false">Apache Commons IO</string>
<string name="library_commonsio_libraryDescription" translatable="false">Commons IO is a library of utilities to assist with developing IO functionality.</string>
<string name="library_commonsio_libraryWebsite" translatable="false">http://commons.apache.org/proper/commons-io/</string>
<string name="library_commonsio_libraryVersion" translatable="false">2.6</string>
<string name="library_commonsio_isOpenSource" translatable="false">true</string>
@illuzor
illuzor / graphics.coverter.xml
Last active February 22, 2016 11:28
graphics.coverter.xml
<project name="Graphics Converter" default="atlasses.and.gafs" basedir="..">
<!--путь к air sdk-->
<property name="flex.home" location="C:/Program Files (x86)/FlexSDK/AIR SDK" />
<!--путь к pvr2atf-->
<property name="atf.tool" location="${flex.home}/atftools/pvr2atf.exe" />
<!--путь к PVRTexToolCLI-->
<property name="pvr.tool" location="C:/Program Files/PowerVR/Tool/PVRTexTool/CLI/Windows_x86_32/PVRTexToolCLI.exe" />
<!--путь к атласам в формате pvr-->
@illuzor
illuzor / l2.xml
Created September 22, 2015 13:54
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@illuzor
illuzor / l.xml
Created September 22, 2015 13:52
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator"
<target name="-compile.for.ios" description="Compiling swf for ios">
<java jar="${asc2.compiler}" failonerror="true" fork="true">
<arg value="-load-config+=${air.config}"/>
<arg value="-load-config+=${compile.config}"/>
<arg value="-debug=${debug.build}"/>
<arg value="+configname=airmobile"/>
<arg value="-swf-version=29"/>
<arg value="-define=CONFIG::flashplayer,false"/>
<arg value="-define=CONFIG::android,false"/>
<arg value="-define=CONFIG::ios,true"/>
<target name="-compile.for.android" description="Compiling swf for android">
<java jar="${asc2.compiler}" failonerror="true" fork="true">
<arg value="-load-config+=${air.config}"/>
<arg value="-load-config+=${compile.config}"/>
<arg value="-debug=${debug.build}"/>
<arg value="+configname=airmobile"/>
<arg value="-swf-version=29"/>
<arg value="-define=CONFIG::flashplayer,false"/>
<arg value="-define=CONFIG::android,true"/>
<arg value="-define=CONFIG::ios,false"/>
<target name="compile.for.player" description="Compiling swf for flashplayer">
<java jar="${asc2.compiler}" failonerror="true" fork="true">
<arg value="-load-config+=${flex.config}"/>
<arg value="-load-config+=${compile.config}"/>
<arg value="-debug=${debug.build}"/>
<arg value="-swf-version=29"/>
<arg value="-define=CONFIG::flashplayer,true"/>
<arg value="-define=CONFIG::android,false"/>
<arg value="-define=CONFIG::ios,false"/>
</java>