Skip to content

Instantly share code, notes, and snippets.

Mike Lloyd mxplusb

Block or report user

Report or block mxplusb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bug.yaml
resources:
- name: release
type: github-release
source:
owner: 18f
repository: cf-service-connect
access_token: ((github-token))
- name: release-source
type: git
icon: github-circle
@mxplusb
mxplusb / uaa.sh
Created Jul 22, 2019
Get the UAA admin token from cf-deployment
View uaa.sh
$ uaac token client get admin -s $(bosh -d cf manifest | bosh int --path /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/admin/client_secret -)
View upstream.diff
diff --git cloud.gov/.final_builds/jobs/archiver_syslog/index.yml cloudfoundry-community/.final_builds/jobs/archiver_syslog/index.yml
index 0ddcdd7..1de12aa 100644
--- cloud.gov/.final_builds/jobs/archiver_syslog/index.yml
+++ cloudfoundry-community/.final_builds/jobs/archiver_syslog/index.yml
@@ -1,4 +1,12 @@
builds:
+ 024340d8d44f7c2c67a5037ceaec88ab99d7f6848a138419774d243e01480f90:
+ version: 024340d8d44f7c2c67a5037ceaec88ab99d7f6848a138419774d243e01480f90
+ blobstore_id: c1726afc-09a5-4df7-715a-f0aae6130f11
+ sha1: sha256:08f57c00a283e586c642668163206aaf7d4f5741e0f8b49c4e1aa4a4f28ad820
View main.go
package main
import (
"database/sql"
"fmt"
"os"
"strconv"
"github.com/cloudfoundry-community/go-cfenv"
"github.com/go-sql-driver/mysql"
View build.cake
#addin "nuget:?package=Cake.FileHelpers&version=3.2.0"
var target = Argument<string>("target");
var globalOutputDir = new DirectoryPath("./build");
var taskHelp = new Dictionary<string,string>() {
{
"Project.DevServer", "Compiles the Project Development Server, which can be easily used for quick and dirty local development."
},
View build.cake
var target = Argument("target", "Welcome");
List<string> tasks = new List<string>();
Setup(context => {
foreach(var task in context.TasksToExecute) {
Information("task: {0}", task.Name);
tasks.Append(task.Name);
}
});
@mxplusb
mxplusb / bootstrap.py
Created May 10, 2019
Bootstrap a new set of packages not included in the Python3 stdlib.
View bootstrap.py
class Bootstrap(object):
"""
Bootstrap a new set of packages not included in the Python3 stdlib.
"""
def __init__(self, **kwargs):
self.__dict__.update(**kwargs)
self._init()
def _init(self):
@mxplusb
mxplusb / stack.py
Created May 9, 2019
Directory stacks in Python
View stack.py
# directory stack
_directory_stack = []
def pushd(target: str):
"""
Push a new directory to the top of the stack and changes to it.
Arguments:
target {str} -- Where you want to go
@mxplusb
mxplusb / headers.json
Created May 7, 2019
Registered HTTP headers in JSON format
View headers.json
{
"Accept": [""],
"Accept-Charset": [""],
"Accept-Encoding": [""],
"Accept-Language": [""],
"Accept-Ranges": [""],
"Access-Control-Allow-Credentials": [""],
"Access-Control-Allow-Headers": [""],
"Access-Control-Allow-Methods": [""],
"Access-Control-Allow-Origin": [""],
@mxplusb
mxplusb / RabbitMQCheckpointRecord.cs
Created May 5, 2019
RabbitMQ checkpoint code for Microsoft Orleans
View RabbitMQCheckpointRecord.cs
using System.ComponentModel.DataAnnotations;
namespace Orleans.RabbitMQ.Providers
{
public class RabbitMQCheckpointRecord
{
[Key]
public int Id;
public string Offset;
public string StreamProviderName;
You can’t perform that action at this time.