Skip to content

Instantly share code, notes, and snippets.

View jugutier's full-sized avatar

Julian Gutierrez jugutier

  • New York, NY
View GitHub Profile
package com.es.thirdparty.taboola;
import com.eachscape.managers.LogMgr;
import com.taboola.android.api.TaboolaOnClickListener;
public class TaboolaOnClickListenerDispatcher implements TaboolaOnClickListener {
private static final String TAG = TaboolaOnClickListenerDispatcher.class.getSimpleName();
private static TaboolaOnClickListenerDispatcher sharedInstance;
@jugutier
jugutier / pods.sql
Last active May 16, 2018 11:15
Get latest pod version with spec
-- Instructions: Run Q1 and Q2 independently, then run the join at the bottom to understand all parts in this query.
-- Q1 Gives us the latest version for each pod with its version_id and the corresponding pod_id
-- Reference: https://stackoverflow.com/a/19602031/1904232
select
latest_version,
pod_versions.id as version_id,
latest_pods.pod_id
@jugutier
jugutier / fixSupportV4.gradle
Created January 12, 2018 22:37
android dependency 'com.android.support:support-v4' has different version for the compile (25.2.0) and runtime (25.3.1) classpath.
/**
error: Android dependency 'com.android.support:support-v4' has different version for the compile (25.2.0) and runtime (25.3.1)
classpath. You should manually set the same version via DependencyResolution
solution: dependency rule to always resolve with a fixed version
description: this problem comes when using implementation 'com.android.support:suppport-v4:25.3.1'
because implementation forces all version of support libraries to match,
if this becomes necessary then we had to add a dependency resolution because
google play services base causes trouble even at version 11.8.0 by bringing version 25.2.0 as its dependency.
*/
@jugutier
jugutier / firebaseDebug.swift
Created December 30, 2017 15:51
How to set FIRAnalyticsDebugEnabled WITHOUT launch arguments
UserDefaults.standard.set("1", forKey: "/google/measurement/debug_mode")
@jugutier
jugutier / SegueFromLeft.swift
Created October 17, 2017 23:07
Custom transition to push a VC in a navigation controller from left instead of right (the usual) More info here: https://stackoverflow.com/a/35574014/1904232
import UIKit
class SegueFromLeft: UIStoryboardSegue {
override func perform() {
let src = self.source
let dst = self.destination
src.view.superview?.insertSubview(dst.view, aboveSubview: src.view)
dst.view.transform = CGAffineTransform(translationX: -src.view.frame.size.width, y: 0)
@jugutier
jugutier / analyze-distribution.sh
Last active July 10, 2017 15:00
code-distribution.sh
#!/bin/bash
function clean_up {
# Perform program exit housekeeping
echo -n "Cleanup? [y/n]: "
read
if [ "$REPLY" = "y" ]; then
echo "Cleaning...."
cd ..
rm -rf distribution
@jugutier
jugutier / .block
Last active July 10, 2017 14:59 — forked from mbostock/.block
Box Plots
license: gpl-3.0
@jugutier
jugutier / adb-inspect.sh
Created February 28, 2017 13:57
Commands to inspect and download files from a running Android app.
adb shell
run-as com.example.myapp
ls
#To pull a file - Needs root
adb pull data/data/com.example.myapp/path/to/file