Skip to content

Instantly share code, notes, and snippets.

View DayS's full-sized avatar

Damien DayS

View GitHub Profile
@DayS
DayS / SessionBugsnagListener.php
Created March 4, 2020 17:31
Bugsnag session tracking for Symfony projects to allow stability score computing
<?php
namespace App\Core\Bugsnag;
use Bugsnag\Client;
use InvalidArgumentException;
use Psr\Container\ContainerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
@DayS
DayS / OnHeapAnalyzedUploaderListener.java
Last active December 4, 2019 15:53
Listener to automatically upload LeakCanary's heap dump analysis on Firebase Storage
import android.content.Context;
import android.os.Build;
import android.widget.Toast;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageMetadata;
import com.google.firebase.storage.StorageReference;
import org.jetbrains.annotations.NotNull;
@DayS
DayS / keybase.md
Last active September 14, 2019 16:52

Keybase proof

I hereby claim:

  • I am days on github.
  • I am dvilleneuve (https://keybase.io/dvilleneuve) on keybase.
  • I have a public key ASCcyYY0XsvEVohKVok7S2FTDJ4ejFgKymuYjoB-VXYdGQo

To claim this, I am signing this object:

@DayS
DayS / apk-debuggable.sh
Created May 9, 2019 11:50
apk-debuggable
#!/bin/sh
function usage(){
printf "Make APK debuggable.\n"
printf "Usage: $0 [options]\n"
printf "\t-f,--file <path> : Direct path to an APK to make debuggable\n"
printf "\t-i,--id <package_name> : Identifier of an APK to pull from device\n"
}
if [ $# -eq 0 ]; then
@DayS
DayS / SimpleGridLayout.java
Last active December 14, 2015 17:48
Display views in a grid with customizable cells sizes an position
import android.content.Context;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class SimpleGridLayout extends ViewGroup {