Skip to content

Instantly share code, notes, and snippets.

👾
TW1oaHBoISBNTUhIUEghISE=

Adrian Pascu adipascu

👾
TW1oaHBoISBNTUhIUEghISE=
Block or report user

Report or block adipascu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View force-hover-none-plugin.js
/*
This fixes issues with:
- devices that incorrectly state they support hover (Samsung Galaxy Note 9, SM-N960F, Android 8.1, Chrome 73)
- devices that do not support media queries for hover, but they are enabled by default in Material-UI
*/
export default {
onProcessStyle(style, rule) {
if (rule.type !== 'style') return style;
let newProps = [];
View original.json
{
"APIVersion": "5747657",
"Id": 14077,
"Name": "Toma",
"Latitude": 50.069373,
"Longitude": 15.898114,
"Sections": [{
"Id": 9313,
"Name": "Parter",
"Scale": 100.00000,
View gradle.properties
org.gradle.daemon=true
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.java.home=/usr/lib/jvm/java-8-oracle/
View navigate.swift
//example URL: vanillanav:navigateTo?venueId=8037&referenceId=19144
public func navigate(venueId: Int, destinationId: Int) -> Bool {
let navigateUrl = NSURL(string: "vanillanav:navigateTo?venueId=\(venueId)&referenceId=\(destinationId)")!
let sharedApp = UIApplication.sharedApplication()
if sharedApp.canOpenURL(navigateUrl) {
sharedApp.openURL(navigateUrl)
return true
} else {
let storeUrl = NSURL(string: "itms-apps://itunes.apple.com/ro/app/vanillanav/id1007116984")!
sharedApp.openURL(storeUrl)
View VanillaNav.java
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
public class VanillaNav {
/**
* Show the navigation screen for a location
*
* @param context used to call {@link Context#startActivity(Intent)}
@adipascu
adipascu / .gitignore
Created Nov 14, 2015
Android gitignore
View .gitignore
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
View rxretrofit.java
.addCallAdapterFactory(new CallAdapter.Factory() {
//relevant SO: https://github.com/square/retrofit/pull/1117
RxJavaCallAdapterFactory delegate = RxJavaCallAdapterFactory.create();
@Override
public CallAdapter<?> get(Type returnType, Annotation[] annotations, Retrofit retrofit) {
//noinspection unchecked
CallAdapter<Observable<?>> delegate2 = (CallAdapter<Observable<?>>) delegate.get(returnType, annotations, retrofit);
return new CallAdapter<Object>() {
@Override
View gist:a1004cb49c5028a3acaa
// Add code to print out the key hash
try {
PackageInfo info = context.getPackageManager().getPackageInfo(
BuildConfig.APPLICATION_ID,
PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
View CrashlyticsTree.java
import android.util.Log;
import com.crashlytics.android.Crashlytics;
import com.crashlytics.android.core.CrashlyticsCore;
import timber.log.Timber;
/**
* Taken from https://gist.github.com/adi1133/2e76e69f8541c2d83473
*/
public class CrashlyticsTree extends Timber.Tree {
You can’t perform that action at this time.