Skip to content

Instantly share code, notes, and snippets.

View sergpetrov's full-sized avatar
🧑‍💻

Sergei Petrov sergpetrov

🧑‍💻
View GitHub Profile
@jitendra7020
jitendra7020 / USPhoneNumberTextWatcher.java
Created June 19, 2016 04:07
US phone number format text watcher
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
public class USPhoneNumberTextWatcher implements TextWatcher {
private final int PHONE_NUMBER_LENGTH = 10;
private final int PHONE_FORMAT_TRIGGER_LENGTH = PHONE_NUMBER_LENGTH + 1;
private final String PHONE_FORMAT = "%s-%s-%s";
@sophia-ooo
sophia-ooo / twitter.sh
Created January 1, 2016 04:45
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4
@tahmidsadik
tahmidsadik / purgeAndroid.txt
Created September 19, 2015 18:47
How to completely remove Android Studio from Mac OS X
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@nschwermann
nschwermann / ProgressView
Last active June 14, 2018 08:39
Material ProgressView
/*
* Copyright (C) 2013 The Android Open Source Project
*
* 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