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
// Reset current local branch by one commit back | |
git reset --hard HEAD~ | |
// Push changes to remote | |
git push origin +branch_name |
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 rm -rf /Library/Developer/CommandLineTools | |
xcode-select --install | |
sudo xcodebuild -license accept | |
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg | |
sudo gem install jazzy | |
brew install ruby | |
// Get installed xcode version and swift version | |
xcodebuild -version |
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
fun Activity.showDialog(title: String, | |
message: String, | |
positiveButtonFunction: () -> Unit = {}, | |
negativeButtonFunction: () -> Unit = {}, | |
positiveButtonText: String = "YES", | |
negativeButtonText: String = "NO") { | |
val builder = AlertDialog.Builder(this) | |
builder.setTitle(title) | |
builder.setMessage(message) |
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"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android"> | |
<alpha android:fromAlpha="0.0" | |
android:toAlpha="1.0" | |
android:interpolator="@android:anim/accelerate_interpolator" | |
android:duration="600" | |
android:repeatMode="reverse" | |
android:repeatCount="infinite"/> | |
</set> |
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
private val broadCastReceiver = object : BroadcastReceiver() { | |
override fun onReceive(contxt: Context?, intent: Intent?) { | |
val action = intent?.action | |
if (action == BluetoothAdapter.ACTION_STATE_CHANGED) { | |
val state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR) | |
when (state) { | |
BluetoothAdapter.STATE_OFF -> setUIBluetoothOff() | |
BluetoothAdapter.STATE_ON -> setUIBluetoothOn() | |
} |
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.bluetooth.BluetoothAdapter | |
import android.content.BroadcastReceiver | |
import android.content.Intent | |
import android.content.Context | |
import dagger.android.AndroidInjection | |
import io.reactivex.Observable | |
import io.reactivex.subjects.BehaviorSubject | |
import javax.inject.Inject | |