Skip to content

Instantly share code, notes, and snippets.

@jush
jush / namecheap-ddns
Last active November 20, 2020 18:47
Simple Namecheap Dynamic DNS client
#!/bin/sh
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
jush / transifex.gradle
Created April 20, 2018 19:31
Gradle script to pull 'strings.xml' from Transifex
import groovyx.net.http.ContentType
import groovyx.net.http.HttpResponseDecorator
import groovyx.net.http.RESTClient
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
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 https://goo.gl/photos/kTWbF7UNbKjy8gKX8)
<?xml version="1.0" encoding="utf-8"?>
<!-- See screenshot at https://goo.gl/photos/kTWbF7UNbKjy8gKX8 -->
<android.support.constraint.ConstraintLayout 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="208dp"
android:background="@android:color/black">
<android.support.constraint.Guideline
@jush
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