Skip to content

Instantly share code, notes, and snippets.

@fei-ke
fei-ke / titaniumbackup-btsync-cleaner.sh
Created July 15, 2018 06:06 — forked from auipga/titaniumbackup-btsync-cleaner.sh
This script helps you to (re)move old TitaniumBackup files when you backup its folder using btsync/Bittorrent Sync/rslsync/Resilio Sync. It keeps the latest 1 backup, older backups will be moved somewhere else.
#!/bin/bash
# remove old backups keeping only the latest one
# run this script only in your TitaniumBackup folder !!!
# create this folder first!
target=old
# pipe|separated|list
exclude="this.is.an.example.org.mozilla.firefox"
# | get app IDs
@fei-ke
fei-ke / renameapk
Last active August 29, 2015 14:11 — forked from fredgrott/renameapk
// in your android.applicationVariants.all { variant ->
// or in your android.libraryVariants.all { variant ->
// code block put this:
if (variant.productFlavors[0] == null){
variant.outputs[0].outputFile = new File(variant.outputs[0].outputFile.parent,
project.ext.ourProjectName + "_"
+ variant.buildType.name + "_"
+ android.defaultConfig.versionCode + "_"
+ android.defaultConfig.versionName + ".apk")
}else{
/*
* Copyright (C) 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
public EdgeEffect(Context context) {
final Resources res = context.getResources();
mEdge = res.getDrawable(R.drawable.overscroll_edge);
mGlow = res.getDrawable(R.drawable.overscroll_glow);
@fei-ke
fei-ke / 0_reuse_code.js
Created October 16, 2013 07:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console