Skip to content

Instantly share code, notes, and snippets.

View ChaseFlorell's full-sized avatar
🇨🇦

Chase Florell ChaseFlorell

🇨🇦
View GitHub Profile
@ChaseFlorell
ChaseFlorell / 1-FunctionTranslator.ps1
Last active August 29, 2015 14:27
First stab at translating functions.
param(
[Parameter(Mandatory=$true, Position=0)]$key
)
Write-Verbose "Attempting to establish new function '$key'"
$keyParts = ($key -split '-')
if($keyParts.length -gt 0){
$validVerb = Get-Verb $keyParts[0]
if(!$validVerb){
Write-Warning "'$($keyParts[0])' is an unapproved verb which might make it less discoverable. Use the Verbose parameter for more detail or type Get-Verb to see the list of approved verbs."
}
@ChaseFlorell
ChaseFlorell / invoke-outHtml.ps1
Last active October 9, 2015 01:31
A PowerShell document generator Influenced by Vegard Hamar's [Out-Html](http://poshcode.org/587)
Import-Module MyAwesomeModule
.\out-html.ps1 -moduleName 'MyAwesomeModule' -outputDir "path\to\output"
@ChaseFlorell
ChaseFlorell / boxstarter.ps1
Last active November 29, 2015 19:55
2015-boxstarter
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOsFiles -showFileExtensions
Enable-RemoteDesktop
choco install agentransack -y
choco install xamarin -y
choco install resharper -y
choco install visualstudio2013professional -y
choco install git -y
choco install poshgit -y
choco install greenshot -y
public ActionResult LogOn(LogOnModel model, string returnUrl)
{
// check if a valid user was selected
var user = GetuserByname(model.UserName);
if (user.ToList().Count != 1)
{
ModelState.AddModelError("Username", "Username is invalid");
}
@ChaseFlorell
ChaseFlorell / _readme.md
Last active December 24, 2015 06:09
New Idea for Contact Cards. For some time now I've been aggravated by the concept of contact cards. As I look through my Address Book, I'm overwhelmed by the inaccuracies in there

#New Idea for Contact Cards

##Rational

For some time now I've been aggravated by the concept of contact cards. As I look through my Address Book, I'm overwhelmed by the inaccuracies in there, even though I'm pretty diligent in ensuring it is up to date. There is no way of communicating an update to your info without a mass email to everyone in your address book, or sending it out over some form of social media. Beyond that, if there's someone who is not in your address book, you probably don't have a way of informing them of your contact update.

I also don't like the fact that once someone has my card, there's no way to take it back. It's a bit of a problem if someone gets your information

I love the idea of QR codes that contain embedded vCard information, and the fact that it's possible to update the information while NOT changing the QR Code. The problem remains however that once someone inserts the vCard into their address book, the only way to update it is manually.

@ChaseFlorell
ChaseFlorell / DrawerToggler.cs
Last active December 31, 2015 06:39
Navigation Drawer Example
// THIS IS THE DRAWER TOGGLER CLASS THAT HANDLES THE TOGGLING.
public class ActionBarDrawerEventArgs : EventArgs
{
public View DrawerView { get; set; }
public float SlideOffset { get; set; }
public int NewState { get; set; }
}
public delegate void ActionBarDrawerChangedEventHandler(object s, ActionBarDrawerEventArgs e);
@ChaseFlorell
ChaseFlorell / LatLong.cs
Created January 27, 2016 18:56
Implicit type example
using System;
namespace Foo.Bar.Baz
{
/// <summary>
/// Allows us to define actual LatLong in our models and have all platforms handle them whether
/// they use float, decimal, or double as their underlying types.
/// </summary>
/// <remarks>Our "opinion" is that at the end of the day, a <see cref="LatLong"/> is simply a <see cref="Double"/></remarks>
public struct LatLong
@ChaseFlorell
ChaseFlorell / BindableMarkdownView.cs
Last active February 9, 2016 23:47
Bindable Markdown View for use with MvvmCross (Mvx) on the Android and iOS platforms.
using System;
using Android.Content;
using Android.Util;
using Android.Webkit;
using MarkdownDeep;
namespace FutureState.Droid.Ui.Controls
{
public class BindalbeMarkdownView : WebView
{
@ChaseFlorell
ChaseFlorell / DbConnectionProvider.cs
Last active March 9, 2016 05:59
Sqlite issues with Xamarin, Mono.Data.Sqlite, and System.Data
using System;
using Mono.Data.Sqlite;
namespace OurApplication.AppCore.Data.Sqlite
{
public class DbConnectionProvider : IDbConnectionProvider
{
private readonly string _connectionString;
public DbConnectionProvider(string sqliteDatabasePath, string databaseName)
@ChaseFlorell
ChaseFlorell / Implementation.cs
Last active June 2, 2016 17:24
Fugly back doors for Xamarin Forms + UITest
app.Invoke("Backdoor", "MyActualMethod")