Any markdown file found inside of the gist will be used as the body of a blog post.
There might be opportunities to do cool things with attached files, but let's just call that a stretch.
What's going on here?!
#!/bin/bash | |
PROJECT=${1:-"$(gcloud config get-value project)"} | |
REGION=${2:-"us-central1"} | |
IMAGE="hub.docker.com/_/nginx" | |
{ | |
gcloud services enable "run.googleapis.com" --project="${PROJECT}" | |
gcloud auth configure-docker --quiet |
#!/bin/bash | |
NAME="some-convention-driven-name-usually-a-resource-group" | |
APP="your-app-name-ideally-another-convention" | |
DEPLOYMENT_PASSWORD=`az appservice web deployment list-site-credentials \ | |
--resource-group ${NAME} \ | |
--name ${APP} \ | |
--query publishingPassword \ | |
--output tsv` |
// tslint:disable-next-line:no-var-requires | |
const edge = require("edge-js"); | |
export interface Options { | |
fileName: string; | |
arguments?: string; | |
} |
namespace App { | |
using Microsoft.AspNet.Identity.EntityFramework; | |
using Microsoft.Data.Entity; | |
public class ApplicationDbContext : IdentityDbContext { | |
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { |
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>*</AllowedHeader> | |
</CORSRule> | |
</CORSConfiguration> |
using Nancy; | |
public class IndexModule : NancyModule { | |
// What would be neat is if I could teach Nancy new ways of handling the right side of routes. | |
public IndexModule() { | |
Get["/"] = typeof(MyProject.Controller.Home); | |
// This would perhaps run a standard method found on the class after instantiating it. |
// http://stackoverflow.com/questions/20907068/how-to-create-a-strongly-typed-collection-that-only-contains-one-element-per-typ | |
class TypedSet<AbstractType> { | |
protected Dictionary<Type, AbstractType> data; | |
public TypedSet() { | |
data = new Dictionary<Type, AbstractType>(); | |
} | |
public void Add(AbstractType subclassOfAbstract) { |
<?php namespace My\Namespace; | |
use Illuminate\Support\Facades\Route; | |
class Routes { | |
public static function all() { | |
static::allDevice(); | |
static::allPlatform(); |
public function setSentAttribute($value) { | |
if($value instanceof DateTime) | |
$value = $value->format('Y-m-d H:i:s'); | |
$this->attributes['sent'] = $value; | |
} |