Skip to content

Instantly share code, notes, and snippets.

View nodinosaur's full-sized avatar

George.M nodinosaur

View GitHub Profile
@nodinosaur
nodinosaur / DeviceUtils.java
Last active January 2, 2016 05:49
Tablet Resolver Activity: In rare instances a Tablet layout may not suffice as components may vary from Phone to Tablet devices
package uk.co.example.android.util;
import android.content.Context;
public class DeviceUtils {
/**
* The minimum width that would classify the device as a tablet.
*/
private static final int MINIMUM_TABLET_WIDTH_DP = 600;// 720
@nodinosaur
nodinosaur / RootCheck.java
Created September 10, 2014 11:02
RootCheck
package com.myapp.utils;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Scanner;
package org.adw.drawables;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.FloatMath;
package com.cyrilmottier.android.citybikes.provider;
import android.net.Uri;
import com.cyrilmottier.android.avelov.BuildConfig;
/**
* @author Cyril Mottier
*/
public class CityBikesContract {
data class UserInfo(val id: String)
data class UserInfoDto(var id: String?)
// Open Inheritance
interface IViewState { }
class Idle: IViewState
import org.junit.Test;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.functions.Func3;
import rx.schedulers.Schedulers;
import rx.subjects.PublishSubject;
/**
@nodinosaur
nodinosaur / The Technical Interview Cheat Sheet.md
Created November 15, 2016 15:29 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@nodinosaur
nodinosaur / AndroidDebugTree.kt
Last active September 28, 2017 12:00
Timber debug Tree that has a clickable Android Studio Link
package xyz.androidalliance.logs
import timber.log.Timber
class AndroidDebugTree : Timber.DebugTree() {
override fun createStackElementTag(element: StackTraceElement): String {
// returns a clickable Android Studio link
return String.format("\n%4\$s .%1\$s(%2\$s:%3\$s)\n\n",
element.methodName,
@nodinosaur
nodinosaur / README.md
Created October 2, 2017 16:27 — forked from lopspower/README.md
Android Tools Attributes

Android Tools Attributes

Twitter

Android has a dedicated XML namespace intended for tools to be able to record information in XML files, and have that information stripped when the application is packaged such that there is no runtime or download size penalty. The namespace URI is http://schemas.android.com/tools and is usually bound to the tools: prefix:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
 android:layout_width="match_parent"
@nodinosaur
nodinosaur / PolyStar.jsfl
Last active July 4, 2019 08:01
PolyStar Tool
var nSides = 5;
var pointParam = 0.5;
var style = "polygon";
var thePolygon = new Array;
var didDrag = false;
var startPt = new Object;
// the values for polygonStyle
var POLYGON = "polygon";