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
// Usage: | |
// blacklist | |
String[] blacklist = new String[]{"com.any.package", "net.other.package"}; | |
// your share intent | |
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("text/plain"); | |
intent.putExtra(Intent.EXTRA_TEXT, "some text"); | |
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject"); | |
// ... anything else you want to add | |
// invoke custom chooser |
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
[detekt-rules build.gradle] | |
apply plugin: 'kotlin' | |
dependencies { | |
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}" | |
implementation "io.gitlab.arturbosch.detekt:detekt-api:${versions.detekt}" | |
implementation "io.gitlab.arturbosch.detekt:detekt-cli:${versions.detekt}" | |
testImplementation "io.gitlab.arturbosch.detekt:detekt-test:${versions.detekt}" | |
testImplementation "junit:junit:${versions.jUnit}" |
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
const cors = require('cors')({origin: true}); | |
exports.sample = functions.https.onRequest((req, res) => { | |
cors(req, res, () => { | |
res.send('Passed.'); | |
}); | |
}); |
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
#!/usr/bin/env bash | |
# Simulate push locally. Configure the proper `deviceToken` | |
# to receive a push notification locally and instantaneously in debug/beta apps. | |
# | |
# - must have "adb" (Android Device Bridge) installed and executable | |
# - for script usage see usage() below or run the script without any parameters | |
# - `com.google.firebase.iid.FirebaseInstanceIdReceiver` receiver must be `exported=true` in `debug/AndroidManifest` | |
#<application> | |
# <!-- Expose this receiver to simulate push notifications via /scripts/push/trigger.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
import { task, types } from "hardhat/config"; | |
import fs from "fs"; | |
import { MerkleTree } from "merkletreejs"; | |
import keccak256 from "keccak256"; | |
// ethers library | |
import "@nomiclabs/hardhat-ethers"; | |
interface PresaleEntry { | |
address: string, |
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
/** | |
* Include all modules in a directory at once. | |
*/ | |
def includeAllModules(def modulesDirName, def modulePrefix = '') { | |
file("$rootDir/$modulesDirName").eachDir { dir -> | |
if (file("$dir/build.gradle").exists() || file("$dir/build.gradle.kts").exists()) { | |
include "${modulePrefix}:${dir.name}" | |
project("${modulePrefix}:${dir.name}").projectDir = dir | |
} | |
} |
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
/** | |
* JapaneseCharacter contains static functions to do various tests | |
* on characters to determine if it is one of the various types of | |
* characters used in the japanese writing system. | |
* <p/> | |
* There are also a functions to translate between Katakana, Hiragana, | |
* and Romaji. | |
* | |
* @author Duane J. May <djmay@mayhoo.com> | |
* @version $Id: JapaneseCharacter.java,v 1.2 2002/04/20 18:10:24 djmay Exp $ |
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
<EditText | |
android:id="@+id/my_edit_text" | |
... | |
android:background="@drawable/some_bg" | |
android:textCursorDrawable="@null" /> |
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
// VueJS with Router, I18n and simple http client | |
import Vue from "vue" | |
import VueI18n from "vue-i18n" | |
import VueRouter from "vue-router" | |
import VueResource from 'vue-resource' | |
// 2 pages for the app states | |
import Splash from "./pages/Splash.vue" | |
import Main from "./pages/Main.vue" | |
import App from "./App.vue" | |
// i18n strings |
NewerOlder