This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install php7.0-dev | |
wget http://xdebug.org/files/xdebug-2.4.0rc2.tgz | |
tar -xzf xdebug-2.4.0rc2.tgz | |
cd xdebug-2.4.0RC2/ | |
phpize | |
./configure --enable-xdebug | |
make | |
sudo cp modules/xdebug.so /usr/lib/. | |
#FOR FPM | |
sudo echo 'zend_extension="/usr/lib/xdebug.so"' > /etc/php/7.0/fpm/conf.d/20-xdebug.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.gson.ExclusionStrategy; | |
import com.google.gson.FieldAttributes; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import io.realm.RealmObject; | |
public class GsonUtil { | |
public static Gson getInstance(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task testfairyAllRelease << { | |
android.productFlavors.all { theProductFlavor -> | |
tasks.getByName("testfairy${theProductFlavor.name.capitalize()}Release").execute() | |
} | |
} | |
testfairyAllRelease.dependsOn assembleRelease |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int darken(int color, double fraction) { | |
int red = (int) Math.round(Math.max(Color.red(color) + 255 * fraction,255)); | |
int green = (int) Math.round(Math.max( Color.green(color) + 255 * fraction,255)); | |
int blue = (int) Math.round(Math.max( Color.blue(color) + 255 * fraction,255)); | |
int alpha = Color.alpha(color); | |
return Color.argb(alpha, red, green, blue); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int brighten(int color, double fraction) { | |
int red = (int) Math.round(Math.max(0,Color.red(color) - 255 * fraction)); | |
int green = (int) Math.round(Math.max(0,Color.green(color) - 255 * fraction)); | |
int blue = (int) Math.round(Math.max(0,Color.blue(color) - 255 * fraction)); | |
return Color.argb(Color.alpha(color);, red, green, blue); | |
} |