Skip to content

Instantly share code, notes, and snippets.

View Mistic92's full-sized avatar

Łukasz Byjoś Mistic92

View GitHub Profile
@Mistic92
Mistic92 / index.ts
Created October 21, 2018 18:16
Example of building carousel on AoG v2 with Firestore
const admin = require('firebase-admin');
admin.initializeApp({
projectId: "XXXXXX"
}
);
const db = admin.firestore();
async function buildItemsCarousel() {
let carouselItems = {};
const INTENT_NEWIDCARD_OPTIONS = 'NewIdCard - yes - option';
app.intent(INTENT_NEWIDCARD_OPTIONS, (conv, input, selectedOption) => {
}
@Mistic92
Mistic92 / Interceptor.java
Last active May 16, 2019 06:09
Fix for Facebook avatar api bug for Glide using OkHttp
public class ApiNetworkInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
if (chain.request().url().host().equals("graph.facebook.com")) {
final Response response = chain.proceed(chain.request());
final int code = response.code();
if(code==200){
response.header("content-disposition","inline");
}
@Mistic92
Mistic92 / CloudAppender.java
Created September 14, 2017 22:03
Log4j2 Google Stackdriver appender (using github.com/GoogleCloudPlatform/google-cloud-java)
@Plugin(name = "CloudAppender", category = "Core", printObject = false)
public class CloudAppender extends AbstractAppender {
private final LoggingOptions loggingOptions;
private final List<LoggingEnhancer> enhancers;
private volatile Logging logging;
protected CloudAppender(String name,
Filter filter,
Layout<? extends Serializable> layout,
LoggingOptions options) {
007.waw.pl
00872.pl
00s.pl
01189998819991197253.pl
01studio.com.pl
0dt.pl
0jakszybkoschudnac.pl
0jj.pl
0k0.pl
0w0.pl
@Mistic92
Mistic92 / build.gradle
Last active August 4, 2016 21:15
Script to copy .apk and mapping file to /deploy/v+versionCode+versionName location. Helps to save apk with corresponding mapping file.
android {
applicationVariants.all { variant ->
def apk
def deployPath
variant.outputs.each { output ->
if (output.outputFile?.name?.contains('release')) {
apk = output.outputFile
}
}
if (variant.getBuildType().isMinifyEnabled()) {