Skip to content

Instantly share code, notes, and snippets.

View Ajimi's full-sized avatar
💻
They see me codin', they hatin'

Selim Ajimi Ajimi

💻
They see me codin', they hatin'
View GitHub Profile
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@emil2k
emil2k / Connectivity.java
Last active December 22, 2023 06:03
Android utility class for checking device's network connectivity and speed.
/*
* Copyright (c) 2017 Emil Davtyan
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
anonymous
anonymous / TestDb.java
Created August 21, 2014 07:40
// Use this in your testLocationTable() method
// Test data we're going to insert into the DB to see if it works.
String testLocationSetting = "99705";
String testCityName = "North Pole";
double testLatitude = 64.7488;
double testLongitude = -147.353;
@kaushikgopal
kaushikgopal / android_lifecycle_recommendations.md
Last active February 2, 2022 07:28
Notes on opportune moments to do "stuff" in the Android Lifecycle
  • In general you want to try and put things in onStart and onStop for logical start and stops.

Activity

onCreate

  • Dagger inject self into graph
  • setContentView(R.layout.xxx)
  • Butterknife.bind(this)
  • RxJava CompositeSubscription.add (if NON UI related work being done)
  • realm = Realm.getDefaultInstance();
@mladenrakonjac
mladenrakonjac / ShoppingContract.java
Created September 15, 2016 06:58
Example of Contract interface in MVP pattern
package me.fleka.deltacity.presentation.shopping;
import java.util.List;
import me.fleka.deltacity.domain.models.Category;
import me.fleka.deltacity.domain.models.Shop;
import me.fleka.deltacity.presentation.BasePresenter;
import me.fleka.deltacity.presentation.BaseView;
/**
* Created by mladenrakonjac on 14/09/16.
@nickbutcher
nickbutcher / ShowbizView.kt
Last active May 24, 2019 03:37
A prototype of an animation I helped out on, see: https://twitter.com/crafty/status/1073612862139064332
/*
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY