Skip to content

Instantly share code, notes, and snippets.

View paulpatarinski's full-sized avatar

Paul P paulpatarinski

  • Simple Productions Inc
  • Miami
View GitHub Profile
@paulpatarinski
paulpatarinski / Salad_NotTestable_Example.cs
Last active August 29, 2015 14:02
Example of a Salad class
public class Salad
{
//Makes a salad
public SaladDTO MakeSalad()
{
var veggies = new List<Veggies>();
var saladService = new SaladService();
@paulpatarinski
paulpatarinski / GetScriptDirectory.ps1
Last active August 29, 2015 14:04
Powershell script that returns the full path of where the script is running from
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value;
if($Invocation.PSScriptRoot)
{
$Invocation.PSScriptRoot;
}
Elseif($Invocation.MyCommand.Path)
{
Split-Path $Invocation.MyCommand.Path
@paulpatarinski
paulpatarinski / NodeAtNetflix.md
Last active August 29, 2015 14:05
Node At Netflix

Why Node :

Modular - Even though they were using immediately invoked functions to create scope they realized the functions were themselves becoming global scope

Lightweight - Does not need to compile, Faster build times (15 min vs 2 seconds), Smaller foot print when running on the server. Allowed them to remove many runtime dependencies, Async allows them to server up requests much faster.

Technologies they use :

Express - Web App Framework
Dust - Templating engine
@paulpatarinski
paulpatarinski / InterviewQuestions.md
Last active August 29, 2015 14:06
Interview Questions
  1. What are the benefits and drawbacks of inline javascript/css?

  2. You have just started a new job and your first project is to help solve the following problem : We have an existing solution with the following specs : 84 projects, static Business Logic Layer and DataAccess that call into stored procedures, tightly coupled code and many developers working on it. How would you go about it? Full re-write vs incremental fixes?

  3. What are the benefits and drawbacks of using an ORM?

  4. Automapper - good/bad?

  5. What is MVVM? When would you use it? What are the benefits? Are you familiar with the Command Pattern?

@paulpatarinski
paulpatarinski / DisableListviewSelection.cs
Last active August 29, 2015 14:06
XamarinForms Disable Listview Selection
//Don't allow selection
listview.ItemSelected += (object sender, SelectedItemChangedEventArgs e) => {
listview.SelectedItem = null;
};
@paulpatarinski
paulpatarinski / HideStatusBar.cs
Last active November 4, 2020 01:08
XamarinForms Hide Status Bar
//ANDROID
//To Hide the Status Bar
this.Window.AddFlags (WindowManagerFlags.Fullscreen);
//To Hide the Nav Bar Icon
ActionBar.SetIcon(new ColorDrawable(Color.Transparent));
@paulpatarinski
paulpatarinski / GenymotionSetup.md
Last active August 29, 2015 14:06
How to get Google apps on Genymotion
@paulpatarinski
paulpatarinski / XamarinEvolveQuestions.md
Last active August 29, 2015 14:07
Xamarin Evolve Questions
  1. How to do error handling? Is there a global error handling event?
  • You can use the MessagingCenter
  1. Styling? Is there a way to apply global styles, templating?
  1. How to create a slide up/down effect for a footer? (Similar to Google Maps)
  1. Images Render differently depending on FromFile vs FromResource?
  2. Support for SVG?
  1. How to create a performant listview?
@paulpatarinski
paulpatarinski / XamFormsBindableProp
Created February 17, 2015 16:49
Xamarin Forms Bindable Property Resharper Template
public static readonly BindableProperty $propertyName$Property =
BindableProperty.Create("$propertyName$", typeof($propType$), typeof($controlType$), default($propType$));
public $propType$ $propertyName$
{
get { return ($propType$)GetValue($propertyName$Property); }
set { SetValue($propertyName$Property, value); }
}
@paulpatarinski
paulpatarinski / XamarinMacSetup.md
Last active August 29, 2015 14:16
Xamarin/Telerik Appbuilder Mac Setup

These are setup steps to get a Mac working with a Win 8 VM running Visual Studio 2013.

Goals :

  • Be able to dev using Visual Studio(or Xamarin Studio) utilizing AppBuilder and Xamarin for all platforms:
    • Win Phone 8/8.1
    • iOS
    • Android

Mac Setup :

  • Software :