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
FILE=app.apks | |
if test -f "$FILE"; then | |
echo "Press enter to delete app.apks" | |
read wait | |
rm app.apks | |
fi | |
if [ -z "$1" ] | |
then | |
echo "No aab file path arguments supplied. Exit." |
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
// Edit from http://blog.vjeux.com/2013/javascript/scroll-position-with-react.html | |
componentDidMount() { | |
const node = ReactDOM.findDOMNode(this); | |
node.scrollTop = node.scrollHeight; | |
} | |
componentWillUpdate: function() { | |
const node = this.getDOMNode(); | |
this.shouldScrollBottom = node.scrollTop + node.offsetHeight === node.scrollHeight; | |
}, |
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 mobile.lekeha.android.bluetoothadapter; | |
import android.Manifest; | |
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothSocket; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; |
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
@GlideModule | |
class MyAppGlideModule: AppGlideModule() { | |
override fun applyOptions(context: Context, builder: GlideBuilder) { | |
super.applyOptions(context, builder) | |
builder.setDefaultRequestOptions( | |
RequestOptions() | |
.format(DecodeFormat.PREFER_ARGB_8888) | |
.diskCacheStrategy(DiskCacheStrategy.DATA) |
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 println(λ: () -> Any) = kotlin.io.println(λ()) |
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
@DslMarker | |
annotation class ReceiptDsl | |
data class Amount(val total: Int, val tax: Float) | |
data class Receipt(val title: String, val date: String, val staffName: String, val amount: Amount) | |
@ReceiptDsl | |
class AmountBuilder { | |
var total: Int = 0 | |
var tax: Float = .0f |
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.your.package | |
import android.app.Dialog | |
import android.os.Bundle | |
import com.your.package.R | |
import com.google.android.material.bottomsheet.BottomSheetDialog | |
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
/** | |
* BottomSheetDialog fragment that uses a custom |
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
allprojects { | |
repositories { | |
google() | |
jcenter() | |
maven { url "https://jitpack.io" } | |
} | |
} | |
ext { |
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
GH_PAGES_DIR = "lekaha.github.io" | |
desc "Build Jekyll site and copy files" | |
task :build do | |
Dir.foreach('notebooks') do |item| | |
next if item == '.' or item == '..' or Dir.exists?(item) or item[/^(.*\.(md|ipynb_checkpoints|py|tpl)$)?$/i] | |
Dir.chdir "notebooks/" | |
sh "ipython nbconvert --config jekyll-post #{item}" | |
Dir.chdir "../" | |
end |
NewerOlder