Skip to content

Instantly share code, notes, and snippets.

View nodinosaur's full-sized avatar

George.M nodinosaur

View GitHub Profile
@nodinosaur
nodinosaur / domain_model_1.dart
Created January 1, 2020 17:08
Recoded Sum Types example
// Root
import 'package:meta/meta.dart';
import 'package:sealed_unions/sealed_unions.dart';
/// ======================================================================
/// Everything above this line is a Doublet & Triplet Sealed Union thing
/// ======================================================================
enum UsState { florida }
enum CaProvince { ontario }
@nodinosaur
nodinosaur / data.dart
Created November 9, 2019 14:03
Simple Waveform Analyzer
This file has been truncated, but you can view the full file.
final waveform = <int>[
0xFFE9, 0xFF6D, 0x0031, 0xFF38, 0x0082, 0xFF2E, 0x00BB, 0xFF66,
0x00A9, 0xFFC0, 0x0066, 0x0017, 0x0010, 0x006D, 0xFFB6, 0x00B2,
0xFF90, 0x00D0, 0xFF95, 0x00CD, 0xFFA0, 0x00CD, 0xFFC0, 0x00F3,
0xFFDC, 0x0132, 0xFFEA, 0x0157, 0xFFF8, 0x013F, 0xFFF8, 0x00F2,
0x000E, 0x0095, 0x005C, 0x006F, 0x00B4, 0x007F, 0x00FE, 0x009F,
0x011F, 0x00B4, 0x00EA, 0x00AD, 0x0091, 0x00A4, 0x0039, 0x00A6,
0xFFF1, 0x00A5, 0xFFE5, 0x009A, 0xFFEE, 0x007E, 0xFFE9, 0x004C,
0xFFE9, 0x003B, 0xFFD8, 0x005D, 0xFFA3, 0x0099, 0xFF5E, 0x00D9,
0xFF02, 0x011C, 0xFECA, 0x0164, 0xFED1, 0x0198, 0xFEDE, 0x01A5,
@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";
@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 / 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 / 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.
import org.junit.Test;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.functions.Func3;
import rx.schedulers.Schedulers;
import rx.subjects.PublishSubject;
/**
data class UserInfo(val id: String)
data class UserInfoDto(var id: String?)
// Open Inheritance
interface IViewState { }
class Idle: IViewState
package com.cyrilmottier.android.citybikes.provider;
import android.net.Uri;
import com.cyrilmottier.android.avelov.BuildConfig;
/**
* @author Cyril Mottier
*/
public class CityBikesContract {
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;