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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
package com.worldline.xcountry.domain.interactor.sale; | |
import com.worldline.xcountry.domain.model.promotion.Promotion; | |
import com.worldline.xcountry.domain.model.promotion.PromotionalItem; | |
import com.worldline.xcountry.domain.model.sale.productdetails.Product; | |
import com.worldline.xcountry.domain.util.Log; | |
import java.lang.ref.WeakReference; | |
import java.util.ArrayList; | |
import java.util.Collections; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<translate xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="50" | |
android:fromXDelta="-5" | |
android:interpolator="@android:anim/accelerate_interpolator" | |
android:repeatCount="5" | |
android:repeatMode="reverse" | |
android:toXDelta="5" /> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<rotate xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="1000" | |
android:fromDegrees="0" | |
android:interpolator="@android:anim/accelerate_decelerate_interpolator" | |
android:pivotX="50%" | |
android:pivotY="50%" | |
android:toDegrees="360" /> |
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
$ git checkout develop | |
$ git branch --merged | grep -v "*" | grep -v -e "[develop|master]" | xargs -n 1 git branch -d |
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
# Description: pass it a mp4 and you will have a gif | |
# Dependencies: ffmpeg, gifsicle | |
if [ "$#" -le 1 ]; then | |
echo "\nUsage: sh gifit.sh <source path to original mp4> <delay between frames>" | |
echo "Warning! filenames shouldn't contain the extension\n" | |
exit 1 | |
fi | |
ffmpeg -i $1.mp4 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=$2 > $1.gif |
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 android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.KeyEvent; | |
import android.widget.EditText; | |
/** | |
* This EditText intercepts key press events on the IME and calls the method. | |
* <p> | |
* Provides a function to handle on hide soft input keyboard event. | |
*/ |
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
/** | |
* Class to print logs friendly | |
*/ | |
public class Log { | |
/** | |
* @return the current thread name and id | |
*/ | |
public static String getThreadName() { | |
String name = Thread.currentThread().getName() + "(" + Thread.currentThread().getId() + ")"; |
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
#!/bin/bash | |
# File: source_code_packaging.sh | |
# Script to generate the source code packaged for the client. | |
date=`date "+%Y_%m_%d"`; | |
commit=`git log -n 1 HEAD --format=%h`; | |
zip -9 -r "${date}_Android_source_code_${commit}.zip" \ | |
.gradle/ \ | |
.idea/ \ | |
build.gradle \ |
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
HOW TO USE: | |
Parameters: | |
inputfile -- path to original file with extension | |
budget -- [debug, test, pilot, rc, rcg] | |
dimension -- dimension in number for generate output file | |
platform -- [ios, android] | |
outputfile -- path to outpuf file with extension | |
Example: |
OlderNewer