Skip to content

Instantly share code, notes, and snippets.

View andrewabest's full-sized avatar

Andrew Best andrewabest

View GitHub Profile
@andrewabest
andrewabest / example-components.html
Last active June 14, 2017 02:37
Independent React Components
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.0/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.0/react-dom.js"></script>
<style>
.componentContainer {
padding:10px;
margin-bottom:20px;
border: 1px solid #000;
@andrewabest
andrewabest / deambiguify.md
Last active May 10, 2017 03:55
.NET Framework, .NET Core and netstandard Oh My!

.NET Framework: The Windows-only .NET runtime and libraries that ship as part of Windows and are maintained with the operating system. The latest version is 4.7, included with Windows 10 Creators Update, and can be installed on Windows Server 2008 R2 and upwards.

.NET Core: The cross-platform fork of .NET, which runs on Windows, macOS, and Linux (various distros are supported). Current version is 1.0, with 2.0 in preview and set for release in the third quarter of 2017.

ASP.NET Core: The next generation of the ASP.NET web framework, which (until now) runs either on .NET Framework or .NET Core. The current version is 1.1, with version 2.0 promised at the same time as .NET Core 2.0.

.NET Standard: A specification that defines APIs available across different versions of .NET. Version 1.6 is supported by .NET Core 1.0 and .NET Framework 4.6.1 and higher, and also by Xamarin on iOS and Android. Version 2.0 is supported by .NET Core 2.0 as well as .NET Framework 4.6.1.

@andrewabest
andrewabest / 1 - Getting Started.md
Last active December 11, 2017 06:30
React Native development on Windows

React Native on Windows

So I've started looking into React Native, as mobile development is still a very hot topic, and I would like to do x-plat mobile development that provides a native experience, but doesn't suck for the developer (I'm looking at you Xamarin). I'm a big fan of React, and doing mobile dev that allows hot-reloading during the dev cycle sounds too good to be true.

I'm also going to be building this app with my son, who is 6. It is going to be for him to track his jobs (chores) and income (pocket money), and track savings and goals - encouraging some financial literacy and hopefully letting him reason about the money he makes and what he can do with it! I'm hoping JSX and Javascript will make for a clean and clear way to teach some of the concepts we will use for building the app. Even running through the boilerplate, it was quite simple to explain to him that a <Text> element in the JSX made the app display some text for us. A good start!

If you follow alon

@andrewabest
andrewabest / Instructions.md
Last active February 16, 2018 05:46
CI for Cordova (iOS) via VSTS, MacInCloud and HockeyApp

Install the Cordova Build and HockeyApp VSTS extensions into your VSTS tenant.

Sign up for a MacInCloud account, and create a VSTS build agent.

Create a pool for your agent in VSTS: https://support.macincloud.com/support/solutions/articles/8000016614-getting-started-with-the-macincloud-vsts-previously-vso-build-agent-plan and configure the agent following the instructions in the article.

Sign up for a HockeyApp account. Create an API token that VSTS will use to talk to HockeyApp via Account Settings > API Tokens.

For HockeyApp, create a service endpoint in VSTS: https://support.hockeyapp.net/kb/third-party-bug-trackers-services-and-webhooks/how-to-use-hockeyapp-with-visual-studio-team-services-vsts-or-team-foundation-server-tfs#installation-for-vsts

@andrewabest
andrewabest / Startup.cs
Created February 1, 2017 06:32
Packages and Startup for WebAPI 2.2 on Owin + IIS hosting
[assembly: OwinStartup(typeof(Startup))]
namespace Api
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
var config = new HttpConfiguration();
@andrewabest
andrewabest / Instructions.md
Created October 18, 2016 04:24
Setting up AppVeyor to CI your OSS

Sure, I use it to publish https://github.com/andrewabest/Conventional

I’ll give you a quick rundown on how to, it is surprisingly easy - in fact if your used to CI / CD being teamcity and octopus, it is easier than shooting fish in a barrel.

  1. Add a nuspec file to the project you want to publish.
  2. Check that you got it right by using nuget pack .\MyProject.csproj -Prop Configuration=Release
  3. Once it is good to go push your nuspec up to your repo.
  4. If you don’t have an account yet, sign up to nuget.org – you’ll need to do this to get assigned an API key to publish packages with.
  5. Sign up to appveyor - using your github credentials is generally the easiest as then it will integrate with your repos easily (assuming they are on github)
  6. Hit “New Project” after you’ve signed up, and select your github repo.
@andrewabest
andrewabest / Example.cs
Last active May 10, 2016 03:33
Deleting child entities when relationship removed in EF
public class PreviousThingDetails : Entity
{
private Multiselect _stuff;
protected PreviousThingDetails()
{
Id = Guid.NewGuid();
}
public PreviousThings PreviousThings { get; protected set; }
@andrewabest
andrewabest / readme.md
Last active December 3, 2019 13:42
Setting up GitVersion in TeamCity

Project Stuff

Firstly - we will use the CommandLine utility to do our versioning - this lets us check the versioning behaviour locally before pushing, which can be super handy!

Install-Package GitVersion.CommandLine

Then, configure gitversion

.\packages\GitVersion.CommandLine.3.5.2\tools\GitVersion.exe init

@andrewabest
andrewabest / eventoptions.cs
Created April 28, 2016 22:29
Emitting IDsrv3 events to Seq
class SeqEventOptions : EventsOptions
{
public SeqEventOptions()
{
RaiseErrorEvents = true;
RaiseFailureEvents = true;
RaiseInformationEvents = true;
RaiseSuccessEvents = true;
}
}
@andrewabest
andrewabest / BigRedButton.bat
Created March 4, 2016 04:05
Big Red Button (#YOLO |> Production)
@ECHO OFF
if [%1]==[] goto :usage
:updateconfiguration
set /P c=Have you updated the appropriate .config files for the environment you are deploying into [Y/N]?
if /I "%c%" EQU "Y" goto :checkpassword
if /I "%c%" EQU "N" goto :exitupdateconfiguration
goto :updateconfiguration