Skip to content

Instantly share code, notes, and snippets.

View tonespy's full-sized avatar
🙄
Lol...

Abubakar Oladeji tonespy

🙄
Lol...
  • Netherlands
View GitHub Profile
@tonespy
tonespy / FloatLabelAutoCompleteTextView.java
Last active August 29, 2015 14:16
FloatLabelEditText Using NineOldAndroids For Animation
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Typeface;
import android.text.Editable;
import android.text.TextWatcher;
import android.text.method.KeyListener;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
<!DOCTYPE <!DOCTYPE html>
<html>
<head>
<title>Call Friends</title>
<link rel="stylesheet" type="text/css" href="holder.css">
</head>
<body>
<div class="main">
<input class="name" placeholder="Full Name"></input>
<input class="name" placeholder="Display Name"></input>
@tonespy
tonespy / queue.js
Created June 1, 2016 08:39 — forked from jpatel531/queue.js
Pusher Message Queue
function MessageQueue(){
this.pusher = new Pusher('key');
this.items = [];
this.timeWindow = 100; // 100 ms
}
// send messages every 100ms
MessageQueue.prototype.cycle = function(){
var self = this;
@tonespy
tonespy / LgaHandler.java
Last active August 9, 2016 14:20
Tail Recursion Retrofit
public class LgaHandler {
private static final String TAG = "Lgahandler";
private static Context mContext;
private static Realm realm;
private static ClientBus clientBus;
private static int page = 1;
private static int perPage = 21;
@tonespy
tonespy / RealmUtil.java
Created August 23, 2016 09:48 — forked from zaki50/RealmUtil.java
put following `RealmUtil` class in `io.realm` package and put `Log.d("RealmCount", RealmUtil.dumpRealmCount());` somewhere in your app code.
package io.realm;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.EnumMap;
import java.util.Map;
public class RealmUtil {
@tonespy
tonespy / proxy_nginx.sh
Created August 25, 2016 19:25 — forked from rdegges/proxy_nginx.sh
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@tonespy
tonespy / Jenkinsfile
Created March 3, 2017 13:53
Jenkins Pipeline Jenkinsfile
// Every jenkins file should start with either a Declarative or Scripted Pipeline entry point.
node {
//Utilizing a try block so as to make the code cleaner and send slack notification in case of any error
try {
//Call function to send a message to Slack
notifyBuild('STARTED')
// Global variable declaration
def project = 'sa-android'
def appName = 'Sample App'
@tonespy
tonespy / Dockerfile
Created March 3, 2017 14:07
Android Development Area Docker
FROM ubuntu:latest
RUN cd /opt
RUN mkdir android-sdk-linux && cd android-sdk-linux/
RUN apt-get update -qq \
&& apt-get install -y openjdk-8-jdk \
&& apt-get install -y wget \
&& apt-get install -y expect \
@tonespy
tonespy / build.gradle
Last active March 3, 2017 14:18
App Level Gradle File
buildscript {
fabric ...
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}