Skip to content

Instantly share code, notes, and snippets.

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

Veaceslav Gaidarji vgaidarji

🚀
:shipit:
View GitHub Profile
@vgaidarji
vgaidarji / Entry.java
Last active August 29, 2015 14:17 — forked from mpost/Entry.java
package com.example.overlay;
public class Entry {
private final int imageResId;
private final String title;
public Entry( int imageResId, String title ) {
this.imageResId = imageResId;
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;
@vgaidarji
vgaidarji / giffify.sh
Last active August 29, 2015 14:24 — forked from rock3r/giffify.py
#!/bin/sh
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi 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 me a beer in return.
# ----------------------------------------------------------------------------
#
# Based upon http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
// WidgetApi.java
public interface WidgetApi {
@GET("/widget/{:id}")
void getWidget(@Path("id") int id, Callback<Widget> callback);
}
// MockRetrofitClient.java
public class MockRetrofitClient implements Client {
private int statusCode = 200;
@vgaidarji
vgaidarji / restore-vagrant-key
Created January 25, 2016 20:11 — forked from amosshapira/restore-vagrant-key
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"
@vgaidarji
vgaidarji / AndroidManifest.xml
Created June 27, 2016 18:05 — forked from billmote/AndroidManifest.xml
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>
@vgaidarji
vgaidarji / RxJava.md
Created September 15, 2016 12:36 — forked from cesarferreira/RxJava.md
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)
@vgaidarji
vgaidarji / checkstyle.gradle
Created October 10, 2016 12:59 — forked from kboyarshinov/checkstyle.gradle
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
@vgaidarji
vgaidarji / build.prop
Created April 26, 2017 18:19 — forked from CHEF-KOCH/build.prop
Android Build.prop tweaks <- FOR ALL AOSP ROMS (4.0.x - 5.0.x) ->
# Begin build properties
# EOL UNIX
# 0.0 644 /system/build.prop
#
# Note: Some changes are Device and OS/ROM independent!
# Note2: Some settings are between
# performance and security <- I prefer last one
#
ro.build.id= -----
ro.build.display.id= -----