Skip to content

Instantly share code, notes, and snippets.

View mediavrog's full-sized avatar

Maik B mediavrog

  • @shackersNFT
  • Germany / Japan
View GitHub Profile
View gist:45e2b4d0a3fbdc30dfae481e7fdf72d9
[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}"
#!/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
# - `` receiver must be `exported=true` in `debug/AndroidManifest`
# <!-- Expose this receiver to simulate push notifications via /scripts/push/ -->
View merkle.ts
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,
mediavrog / settings.gradle
Created February 10, 2023 13:16
Include gradle modules from a directory automatically
View settings.gradle
* 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}:${}"
project("${modulePrefix}:${}").projectDir = dir
mediavrog /
Created May 1, 2017 08:01
Default issue template at AIR

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

mediavrog /
Last active May 1, 2017 07:57
Default Pull Request template for AIR.

Fixes #

Changes proposed in this PR

Review requested by @

mediavrog / gist:49c4f809dffea4e00738a7f5e3bbfa59
Last active April 14, 2023 08:56
CORS in Google Cloud Functions for Firebase
View gist:49c4f809dffea4e00738a7f5e3bbfa59
const cors = require('cors')({origin: true});
exports.sample = functions.https.onRequest((req, res) => {
cors(req, res, () => {
mediavrog / main.js
Created October 24, 2016 10:13
Simple bootstrapping for a VueJS app with I18n, Routing and http client
View main.js
// 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
mediavrog /
Last active August 26, 2016 03:33
Javascript / Coffeescript snipped to use Google Analytics with Turbolinks in Rails 4
# add the tracking code normally to your layout; then include this in every page
$(document).on 'page:change', ->
ga('send', 'pageview');
else if window._gaq?
else if window.pageTracker?