Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vgaidarji's full-sized avatar
🚀
:shipit:

Veaceslav Gaidarji vgaidarji

🚀
:shipit:
View GitHub Profile
@WarrenFaith
WarrenFaith / build.gradle
Last active March 11, 2019 11:33
Basic script setup to add tasks like "testDebugUnitTestCoverage" (when you have no flavors defined) or "testFlavorNameDebugUnitTestCoverage" (replace FlavorName with your flavor name). Limitation: Does not work with flavor dimensions!
// in your root gradle file:
buildscript {
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.1"
}
@vgaidarji
vgaidarji / show-git-remote-ages.sh
Created May 19, 2017 09:01
Script which lists remote branches by age and includes some related information to identify last author and any branch names.
#!/bin/sh
exec git branch -r | cut -d' ' -f3 | xargs git show --pretty='%Cgreen%ai %Creset%h %an %d' -s | sed '/^$/d' | sort | uniq
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@jamesmontemagno
jamesmontemagno / bump_manifest.sh
Last active January 22, 2016 19:18
This is a script to bump your version number for android projects on Bitrise or just in shell commands
Find the latest here actually: https://github.com/jamesmontemagno/steps-set-android-manifest-versions
@cesarferreira
cesarferreira / RxJava.md
Last active February 2, 2022 07:28
Party tricks with RxJava, RxAndroid & Retrolambda

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
@amosshapira
amosshapira / restore-vagrant-key
Created July 9, 2015 07:15
Restore Vagrant authorized_keys on a Vagrant box
#!/bin/bash
MACHINE=$1
# Assume executing in the directory of the Vagrant file
# This command will prompt for the Vagrant user's password, it's usually "vagrant"
ssh-keygen -y -f .vagrant/machines/$MACHINE/virtualbox/private_key | \
vagrant ssh $MACHIME -c "mkdir .ssh; tee -a .ssh/authorized_keys; chmod 0600 .ssh/authorized_keys"
@rock3r
rock3r / giffify.py
Last active January 14, 2022 09:00
Giffify - easily create optimised GIFs from a video
#!/usr/bin/python
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
import argparse, sys, subprocess, tempfile
@rharter
rharter / RevealDrawable.java
Created April 3, 2015 17:41
A Drawable that transitions between two child Drawables based on this Drawable's current level value. The idea here is that the center value (5000) will show the 'selected' Drawable, and any other value will show a transitional value between the 'selected' Drawable and the 'unselected' Drawable.
package com.pixite.fragment.widget;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.view.Gravity;
@billmote
billmote / AndroidManifest.xml
Last active October 15, 2023 10:48 — forked from JakeWharton/gist:f50f3b4d87e57d8e96e9
When pushing code from your IDE, wake the device and show the activity.
<?xml version="1.0" encoding="utf-8"?>
<!-- Add this as a debug manifest so the permissions won't be required by your production app -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
</manifest>
@kboyarshinov
kboyarshinov / checkstyle.gradle
Last active August 9, 2020 15:48
Code quality gradle scripts for Android
/**
* Checkstyle tasks
* Usage:
* - place this file under root dir of your project at /gradle directory
* - apply script from your gradle file:
* apply from : "{rootDir}/gradle/checkstyle.gradle"
*
* To configure checkstyle use configs at:
* "{rootDir}/config/checkstyle/checkstyle.xml" - for main projects
* "{rootDir}/config/checkstyle/checkstyle-test.xml" - for tests