/* BeejBløg */

Nov 22, 2016 - 1 minute read - Comments - Uncategorized

Solving Visual Studio 2017 -> Xamarin Mac Agent connectivity issues

this seems to be a recurring theme for me so i expect to be throwing more bones on this pile as the sands of time leave behind our lives sublime Xamarin Forums Post i had VS2017 doing iOS builds just yesterday but for some reason was getting persist Mac Agent “can’t connect” errors today… and zilch in the xam logs to go on, yikes… thankfully struck me to look at Mac “Console” system.

Nov 21, 2016 - 1 minute read - Comments - Uncategorized

Recurring Windows 10 Tweaks

once and for all 🙂 Shortcuts for “Pin To Start” %appdata%\Microsoft\Windows\Start Menu Start Menu right mouse (aka “Win+X” menu) install Win+X Menu Editor my faves: Name Target Win+X Menu Editor C:\Users\beej1\Beej\bin\Win+X Menu Editor v2.7.0.0\WinXEditor.exe Command Prompt C:\Program Files\ConEmu\ConEmu64.exe Windows PowerShell powershell.exe Edit Environment Variables rundll32.exe sysdm.cpl,EditEnvironmentVariables Uninstall Programs appwiz.cpl Windows Features OptionalFeatures.exe Services services.

Nov 2, 2016 - 2 minute read - Comments - Uncategorized

“Hot Corners” for Windows (PowerShell)

GitHub files PoShHotCorners “Hot Corners” for Windows install none really, simply download the ico and ps1 files to a folder and launch the ps1 please note MakeShortcut.cmd batch file provided for convenience … throw resulting .lnk file in your “run on startup” folder if you like: "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup" as you can see, the batch file simply runs shortcut tool xxmklink.exe with appropriate arguments notes currently coded to power down monitors triggered by mouse in lower right corner … but it’s just powershell folks, so think grand!

Oct 28, 2016 - 1 minute read - Comments - Uncategorized

Linq Enumerable to another Collection

given devices is an IEnumberable<> var nvc = devices.Aggregate(new NameValueCollection(), (seed, current) => { seed.Add("device", current.Id.ToString()); return seed; }); Json Array of objects to Dictionary, keyed (indexed) on chosen property using Json.Net; //Newtonsoft using Json.Net.Linq; public class Device { public int Id {get; set;} public string Name {get; set;} public string Property {get; set;} } var json = @"[{id: 1, name: ""name1"", prop: ""prop1""}, {id: 2, name: ""name2"", prop: ""prop""}]"; var devicesDictionary = JArray.

Oct 24, 2016 - 1 minute read - Comments - Uncategorized

PHP SQL Server blob hosting

from here see this post for sql server driver downloads   downloadPDF.php <?php header('Content-type: application/pdf'); // leave this out to open directly in browser: header('Content-Disposition: attachment; filename="my.pdf"'); include("SQLConnect.php"); $sql = "select InvoiceDocument from SalesInvoicePDF where InvoiceID = '123'"; $stmt = sqlsrv_query($conn, $sql); if ( sqlsrv_fetch($stmt) ) { //this pulls the first field via "0" $data = sqlsrv_get_field($stmt, 0, SQLSRV_PHPTYPE_STREAM(SQLSRV_ENC_BINARY)); // write binary sql stream directly to http response fpassthru($data); } ?

Oct 14, 2016 - 2 minute read - Comments - Uncategorized

Lighter Spin on ADAL in Xamarin Forms

tl;dr new-up the elusive “PlatformParameters” in your AppDeligate.cs::FinishedLoading / MainActivity.cs::OnCreate   ts;wm (too short; want more ; ) thankfully we have solid writeups on ADAL with XF… this post is just me trying to boil it down to essence and PCL as much as possible… (BTW: ADAL = Active Directory Auth Lib… i needed it for PowerBI embedding) https://www.appzinside.com/2016/02/22/implement-adal-for-cross-platform-xamarin-applications/ https://blog.xamarin.com/authenticate-mobile-apps-using-microsoft-authentication-library/ the first post keeps the platform specific surface area pretty minimal but also winds up wrappering the stock ADAL classes quite a bit…

Oct 4, 2016 - 2 minute read - Comments - Uncategorized

Toggle XAML <> Code-Behind in Visual Studio 2015, ReSharper, Xamarin Forms

Quickly bouncing between .XAML and corresponding .CS file just seems like an obvious need… i feel like we used to have this in WPF but it’s been a few years for me. Short Story: this approach simply maps preferred hotkey to ReSharper’s “Go To Related Files” command… sorry if that’s not an expense you care to bear but it’s a great tool for numerous reasons if you can spring for it Visual Studio > Tools menu > Options > Environment > Keyboard “Show commands containing” edit box enter: relatedfiles select “ReSharper.

Sep 22, 2016 - 2 minute read - Comments - Uncategorized

Using “C# Interactive” aka CSI/CSX for ETL

motivation interactive C# offers typical REPL benefits ala powershell without the mental context switch required to leave our beloved C# syntax =)   notable great MSDN reference article CSX syntax can be executed from either Visual Studio 2015 (as of update 1) > View > Other Windows > C# Interactive -or- C:\Program Files (x86)\MSBuild\14.0\bin\csi.exe then #load file.csx Extract this example is based on a low fidelity web page as the raw data source

Aug 21, 2016 - 5 minute read - Comments - Uncategorized

GreaseMonkey hacking Gmail

motivation i wanted to see if i could get category bundling working in gmail ala outlook… it’s always been a nice mental flow for me to carve out pending events from littering my “inbox zero” but still see them right there in front so i don’t forget to check up on them vs a click away hidden under a “folder” update – don’t miss the google “labs” functionality for doing exactly this kind of category bundling