Skip to content

Instantly share code, notes, and snippets.

View dbeattie71's full-sized avatar

Derek Beattie dbeattie71

  • Nebraska
  • 10:06 (UTC -05:00)
View GitHub Profile
@dbeattie71
dbeattie71 / DemoSetup.wixproj
Created January 9, 2017 16:49 — forked from dasMulli/DemoSetup.wixproj
Demo wix project to publish a self-contained .NET Core app
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>91e4dc15-312a-4e90-bc1c-01de5dc99447</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>CoreConsoleAppSetup</OutputName>
<OutputType>Package</OutputType>
@dbeattie71
dbeattie71 / Startup.cs
Created December 22, 2016 18:48 — forked from KerryRitter/Startup.cs
OpenIddict Startup Example (with postgres and custom password rules)
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
namespace MyApp.Api
=====================
12/4/2016 12:15:53 PM
Recoverable
System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: key
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.EnsureNotFaultedTree(IProjectVersionedValue`1 appliedValue)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.<PublishLatestTreeAsync>d__67.MoveNext()
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.<PublishTreeAsync>d__66.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
@dbeattie71
dbeattie71 / wale_postgres_recovery.md
Created November 7, 2016 00:43 — forked from elithrar/wale_postgres_recovery.md
WAL-E + Postgres 9.x (single server + DB) Setup and Recovery

A quick "how to" on what you need to do to both setup AND recover a single-server PostgreSQL database using WAL-E

  • WAL-E: https://github.com/wal-e/wal-e
  • Assuming Ubuntu 12.04 LTS ("Precise")
  • We'll be using S3. Make sure you have an IAM in a group with GetObject, ListBucket and PutObject on the bucket you want to use (and that it's not public).

Setup:

  1. These packages:
@dbeattie71
dbeattie71 / vagrant.rb
Created August 23, 2016 21:26 — forked from bjjb/vagrant.rb
A Capistrano 3.x Vagrant stage. Place into config/deploy/vagrant.rb, and deploy to the Vagrant box as if it were a production VM.
# Capistrano 3.x Vagrant stage
# config/deploy/vagrant.rb
set :stage, :vagrant
set :rails_env, "production"
vagrant_ssh_config = `vagrant ssh-config`.split("\n")[1..-1].map(&:strip).inject({}) do |m, s|
k, v = s.split(/\s/, 2).map(&:strip); m[k] = v; m
end
using System.Collections.Generic;
using System.Threading.Tasks;
using ExpressPoll.Core.Common.QueryBuilder;
using ExpressPoll.Core.Common.QueryBuilder.Enums;
using ExpressPoll.Core.Common.SQLite;
using ExpressPoll.Core.Domain.Models;
using SQLite.Net;
using SQLite.Net.Async;
namespace ExpressPoll.Core.Domain
using System.Collections.Generic;
using ExpressPoll.Core.CBE.Pdm.Model;
namespace ExpressPoll.Core.CBE.Services.Business.Voter
{
public class RequestFindVoter : RequestBase
{
public SearchByEnum SearchBy { get; private set; }
public SearchAreaEnum SearchArea { get; private set; }

Download and Install Vagrant http://www.vagrantup.com/ and VirtualBox https://www.virtualbox.org/ or VMware before beginning

#Set up Vagrant *this guide assumes the use of Mac OS X Mountain Lion on local machine and Ubuntu 12.04 LTS x64 on Vagrant box. It is compatible with many other distros but hasn't been tested.

##Step 1: Make and run box

vagrant init
vagrant box add <path to box directory or name according to https://vagrantcloud.com/>
vagrant up
@dbeattie71
dbeattie71 / README.md
Created July 27, 2016 17:22 — forked from dergachev/README.md
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@dbeattie71
dbeattie71 / 0001_fix_permissions.config
Created July 21, 2016 05:20 — forked from jgautsch/0001_fix_permissions.config
AWS Elastic Beanstalk Ruby 2.0/Passenger Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.2 running Ruby 2.0 (Passenger Standalone) stack. This is everything in my .ebextensions folder. Based on https://gist.github.com/gcarrion-gfrmedia/11396682
# Fixing permissions of packaged gems
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/10_fixing_permission.sh":
content: |
#!/usr/bin/env bash
# . /opt/elasticbeanstalk/containerfiles/envvars
. /opt/elasticbeanstalk/support/envvars
CACHE_GEM_DIR=$EB_CONFIG_APP_ONDECK/vendor/cache