- Open PowerShell
$ powershell
# Clone and build OBS | |
git clone --recursive https://github.com/obsproject/obs-studio.git | |
cd obs-studio | |
# Follow normal OBS build steps | |
brew install FFmpeg x264 Qt5 cmake mbedtls swig | |
mkdir build | |
cd build | |
export QTDIR=/usr/local/opt/qt | |
cmake .. |
import SwiftUI | |
struct ContentView: View { | |
@State var selectedView = 1 | |
var body: some View { | |
VStack { | |
TabView(selection: $selectedView) { | |
Text("Tab Content 1") |
import androidx.recyclerview.widget.RecyclerView.AdapterDataObserver
myAdapter.apply {
registerAdapterDataObserver(object : AdapterDataObserver() {
override fun onItemRangeInserted(positionStart: Int, itemCount: Int) {
if (positionStart == 0) {
recyclerView.layoutManager?.scrollToPosition(0)
}
}
object TimeAgo { | |
private val SECOND_MILLIS = 1000 | |
private val MINUTE_MILLIS = 60 * SECOND_MILLIS | |
private val HOUR_MILLIS = 60 * MINUTE_MILLIS | |
private val DAY_MILLIS = 24 * HOUR_MILLIS | |
fun getTimeAgo(time: Long): String? { | |
var time = time | |
if (time < 1000000000000L) { |
fun checkLocationServiceSettings(activity: Activity) { | |
val googleApiClient = GoogleApiClient.Builder(activity) | |
.addApi(LocationServices.API) | |
.build() | |
googleApiClient.connect() | |
val builder = LocationSettingsRequest.Builder() | |
.apply { |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
/Users/username/.gradle/wrapper/dists
class Cmake < Formula | |
desc "Cross-platform make" | |
homepage "https://www.cmake.org/" | |
url "https://github.com/Kitware/CMake/releases/download/v3.10.2/cmake-3.10.2.tar.gz" | |
sha256 "80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b" | |
head "https://cmake.org/cmake.git" | |
bottle do | |
cellar :any_skip_relocation | |
sha256 "5c421f98d773951dc9cdb0888e01262e65243c1c19c05e6126293c30e835f912" => :mojave |