Skip to content

Instantly share code, notes, and snippets.

@Jacknic
Jacknic / init.gradle.kts
Last active June 27, 2024 02:25 — forked from bennyhuo/init.gradle.kts
How to config mirrors for repositories in Gradle without changing the source code of your project?
@file:Suppress("UnstableApiUsage")
import org.gradle.util.GradleVersion
val urlMappingsTencent = mapOf(
"https://repo.maven.apache.org/maven2" to "https://mirrors.tencent.com/nexus/repository/maven-public/",
"https://dl.google.com/dl/android/maven2" to "https://mirrors.tencent.com/nexus/repository/maven-public/",
"https://plugins.gradle.org/m2" to "https://mirrors.tencent.com/nexus/repository/gradle-plugins/"
)
meta:
id: rtp_packet
file-extension: rtp
endian: be
license: CC0-1.0
doc-ref: https://tools.ietf.org/html/rfc3550
seq:
- id: version
type: b2
- id: has_padding
@gyf304
gyf304 / nal-byte-stream.ksy
Created October 8, 2019 15:13
Kaitai NAL byte-stream parser
meta:
id: nal_byte_stream
file-extension: h264
endian: be
license: CC0-1.0
doc-ref: https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.264-200305-S!!PDF-E&type=items
seq:
- id: nal_byte_stream_segments
type: nal_byte_stream_segment
repeat: eos
@Robyer
Robyer / maven-publish-helper-usage.gradle
Last active February 20, 2025 14:37
Gradle script for publishing Android library with sources and javadoc to Maven repository using maven-publish plugin.
// You can use maven-publish-helper.gradle script without changes and even share it between multiple
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project,
// then apply it at the bottom of your module's build.gradle file like this:
// ...content of module's build.gradle file...
apply from: '../maven-publish-helper.gradle'
publishing {
publications {
@smdabdoub
smdabdoub / merge_git_repo_as_subdir
Created June 9, 2015 14:02
Merge one git repository into another repository as a sub-directory
# based on the following:
# http://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/
# http://blog.caplin.com/2013/09/18/merging-two-git-repositories/
git clone repo_main
git clone repo_sub
cd repo_main
git remote add repo_sub ../repo_sub
git fetch repo_sub
301 https://github.com/zxdrive/imouto.host
@tahl
tahl / installer.sh
Created June 15, 2011 06:56
Android SDK + NDK + Eclipse and ADB Installer
#!/bin/bash
#
#This script is designed to install the Android SDK, NDK, and Eclipse in Linux Mint 11 and make it easier for people that want to develop for Android using Linux.
#Script written by @ArchDukeDoug with special thanks to @BoneyNicole, @tabbwabb, and @animedbz16 for putting up with me and proofreading and/or testing the script.
#I can be reached at [email protected], twitter, or linuxrandomly.blogspot.com
#Script version: 1.0.5
#Changelog: 1.0.5 - Fixed the Android SDK search parameters to fit the new naming scheme on http://developer.android.com/sdk
i=$(cat /proc/$PPID/cmdline)
if [[ $UID != 0 ]]; then
echo "Please type sudo $0 $*to use this."