Skip to content

Instantly share code, notes, and snippets.

jush / shark-custom-script.main.kts
Last active May 6, 2024 10:23 — forked from pyricau/shark-custom-script.main.kts
A standalone Kotlin script that shows how to do custom heap analysis work with Shark, the heap parsing library that powers LeakCanary (see
#!/usr/bin/env -S JAVA_OPTS="-Xmx16g" kotlin
// In order to analyze big heaps you might need to modify above `-Xmx16g` Java option.
// Before running this script, install Kotlin with `brew install kotlin`
// Then run this with `kotlin shark-custom-script.main.kts`
// Edit this script in the latest Android Studio or IntelliJ IDEA releases to get dependency import and auto completion.
jush / namecheap-ddns
Last active November 20, 2020 18:47
Simple Namecheap Dynamic DNS client
set -eu
FETCH="curl -s"
# or for curl:
#FETCH="curl -s"
# $1: your domain
# $2: subdomain to update use @ for TLD
# $3: the password given to you by Namecheap's web interface
# Rerun this script every 5 minutes. Crontab entry (not as root):
jush / transifex.gradle
Created April 20, 2018 19:31
Gradle script to pull 'strings.xml' from Transifex
import net.sf.json.JSONObject
import org.apache.commons.codec.binary.Base64
// This gradle file will add several tasks.
// For example, pulling all source and translation files at once for all projects:
// ./gradlew transifexPullAll
jush / uneven_vertical_weighted_spread_inside_chain_cl.xml
Last active March 28, 2017 17:34
Constraint layout example of an unevenly distributed vertical weighted spread inside chain (Screenshot at
<?xml version="1.0" encoding="utf-8"?>
<!-- See screenshot at -->
< xmlns:android=""
jush / build.gradle
Last active December 18, 2015 07:19 — forked from jpeddicord/build.gradle
// additional required configuration to hook into the build script
android {
signingConfigs {
release {
// specify signing properties on the command line
if (project.hasProperty('keyStore')) {
println 'Generating a signed package.'
storeFile file(keyStore)
storePassword storePass
keyAlias alias