Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

OGx09 OGx09

🎯
Focusing
  • Lagos, Nigeria
View GitHub Profile
@OGx09
OGx09 / omni_state.dart
Last active Oct 31, 2020
Some code snippet to handle your messy API call states. ;) #EndSARS
View omni_state.dart
class ApiState<T> {
String message;
T data;
ApiStates state;
ApiState(this.state, this.data, this.message);
static ApiState<T> loading<T>() {
return ApiState<T>(ApiStates.Loading, null, null);
}
@OGx09
OGx09 / TimeOutService.java
Created Oct 16, 2019
A service that handles app timeout
View TimeOutService.java
package devmike.leviapps.co.tensorlitepose.device;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.os.SystemClock;
@OGx09
OGx09 / PartClickTextView.java
Created May 23, 2018
This code snippet makes part of a string clickable.
View PartClickTextView.java
public class PartClickTextView extends TextView{
public static final String TAG = PartClickTextView.class.getSimpleName();
private OnPartTextClickListener mListener;
public interface OnPartTextClickListener{
void onPartTextClick(View view);
}
public void setOnPartTextClickListener(OnPartTextClickListener mCallback){
View gist:5a4f80c09e13e9e782bec723740265cd
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int _tmain()