Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Working

Osama Raddad osama-raddad

💻
Working
View GitHub Profile
View evaluate.kt
FireCrasher.install(this, object : CrashListener() {
override fun onCrash(throwable: Throwable) {
evaluate { activity, crashLevel ->
recover {
Toast.makeText(this@App, "recover", Toast.LENGTH_LONG).show()
}
}
View gist:7edb894b8206ce6cc225ce9d86a6d0f8
class App : Application() {
override fun onCreate() {
super.onCreate()
FireCrasher.install(this, object : CrashListener() {
override fun onCrash(throwable: Throwable, activity: Activity) {
Toast.makeText(activity, throwable.message, Toast.LENGTH_SHORT).show()
// start the recovering process
recover(activity)
View gist:d67fed52eb4087ca4a719620c2f5a961
dependencies {
implementation 'com.github.osama-raddad:FireCrasher:2.0.0'
}
View jitpack.groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
View GravitySnapHelper.java
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.LinearSnapHelper;
import android.support.v7.widget.OrientationHelper;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.LayoutManager;
import android.view.Gravity;
import android.view.View;
@osama-raddad
osama-raddad / ApiModule.java
Created Nov 9, 2017 — forked from msangel/ApiModule.java
Retrofit 1 error handling behaviour in Retrofit 2.3.0
View ApiModule.java
// Dagger 1 example
@Module(
complete = false,
library = true
)
public final class ApiModule {
@Provides
@Singleton
Retrofit provideRetrofit(Gson gson, Application app) {
return new Retrofit.Builder()
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/1.2.2/bluebird.js"></script>
<title>JS Bin</title>
</head>
<body>
@osama-raddad
osama-raddad / Neat Emoticons
Created May 15, 2017 — forked from DeadlyBrad42/Neat Emoticons
Not that we needed all that for the trip, but once you get locked into a serious emoticon collection, the tendency is to push it as far as you can.
View Neat Emoticons
Neat Emoticons & Unicode Characters!
(•_• )
( •_•)
( •_•)>⌐■-■
(⌐■_■)
⌐■-■
⌐■-■
⌐■-■
View tools.md
  1. git
  2. geany
  3. letsencrypt
  4. docker
  5. vagrant
  6. meld
  7. git-sweep
  8. htop
  9. nano
  10. terminator
@osama-raddad
osama-raddad / chai-expect.md
Created Mar 8, 2017 — forked from patocallaghan/chai-expect.md
Chai Expect Assertion library examples. From http://chaijs.com/api/bdd/ #chai #javascript #expect
View chai-expect.md

##Chai Expect

##Language Chains

  • to
  • be
  • been
  • is
  • that
  • and
  • have
You can’t perform that action at this time.