View CViewPager.kt
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 eram.ir.camerapager | |
import android.animation.ValueAnimator | |
import android.app.Activity | |
import android.content.Context | |
import android.support.v4.app.FragmentActivity | |
import android.support.v4.view.ViewPager | |
import android.util.AttributeSet | |
import android.util.Log | |
import android.view.MotionEvent |
View CameraFragment.kt
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 eram.ir.camerapager | |
import android.os.Bundle | |
import android.support.v4.app.Fragment | |
import kotlinx.android.synthetic.main.camera_fragment.* | |
import android.view.* | |
import android.widget.FrameLayout | |
import android.animation.ValueAnimator | |
import android.content.res.Resources | |
import android.view.animation.DecelerateInterpolator |
View BroadcastChannelTest.kt
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 kotlinx.coroutines.* | |
import kotlinx.coroutines.channels.BroadcastChannel | |
import kotlinx.coroutines.channels.consume | |
import kotlinx.coroutines.test.runBlockingTest | |
import org.junit.Test | |
class BroadcastChannelTest { | |
@ExperimentalCoroutinesApi | |
companion object { |
View StateFlowTest.kt
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 kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.FlowPreview | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.flow.MutableStateFlow | |
import kotlinx.coroutines.flow.collect | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.test.runBlockingTest | |
import org.junit.Test | |
View StateFlowBroadcastTest.kt
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 kotlinx.coroutines.* | |
import kotlinx.coroutines.channels.consumeEach | |
import kotlinx.coroutines.flow.MutableStateFlow | |
import kotlinx.coroutines.flow.broadcastIn | |
import kotlinx.coroutines.test.runBlockingTest | |
import org.junit.Test | |
class StateFlowBroadcastTest { |
View PrintActivity.java
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 ir.eram.printexample; | |
import android.app.ProgressDialog; | |
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothClass; | |
import android.bluetooth.BluetoothDevice; | |
import android.graphics.Color; | |
import android.graphics.drawable.ColorDrawable; | |
import android.os.AsyncTask; | |
import android.os.Bundle; |
View remap_keyboard_kubuntu
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
Remap Super(left) to ctrl left: | |
remove mod4 = Super_L | |
add control = Super_L |
View bypass_script.sh
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
DEV=enp4s0 | |
GW=$(ip route list | sed "s/.* via \([0-9.]*\) dev $DEV.*/\1/;t;d"|head -1) | |
route add -host git.mycompany.com gw $GW $DEV |