Skip to content

Instantly share code, notes, and snippets.

@maxlinc
maxlinc / build_environment.md
Created June 2, 2014 22:20
Mapping the travis build environment to windows

I'm trying to take the current Build Environment documentation and see what is applicable on Windows. This is obviously a moving target, and my goal isn't necessarily to keep this up to date as much as it's to get an initial ideal of what does and doesn't make sense on Windows.

This might be better as a wiki or some other collaborative document, but I didn't see a wiki and don't know if you use something else, so I created an issue.

Common Environment

Networking

I'm not sure anything special is needed for IPv6 support, but I think it's not part of an MVP. There are plenty of projects that could test on windows with ipv4 only.

Version Control

@maxlinc
maxlinc / setup_winrm.ps1
Last active August 29, 2015 14:02
Setup WinRM
Function GetRDPCert
{
$srcStoreScope = "LocalMachine"
$srcStoreName = "Remote Desktop"
$srcStore = New-Object System.Security.Cryptography.X509Certificates.X509Store $srcStoreName, $srcStoreScope
$srcStore.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadOnly)
Write-Host "Existing certificates:"
Write-Host $srcStore.Certificates | select -expand Subject
return $srcStore.Certificates -match "${env:computername}"
}
@maxlinc
maxlinc / Vagrantfile
Last active November 12, 2020 11:03
Workaround for Vagrant #2733
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "dummy"
config.vm.provider :rackspace do |rs|
Vagrant.configure("2") do |config|
config.vm.define :suite_brettswift_com do |nodeserver|
config.vm.provider :rackspace do |rs, override|
override.vm.box = "rackspace"
override.vm.box_url = "https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box"
rs.username = "#{ENV['RACKSPACE_USERNAME']}"
@maxlinc
maxlinc / template_with_arrays.rb
Last active August 29, 2015 14:04
URI template sample
template = Addressable::Template.new 'http://open.mapquestapi.com/staticmap/v4/getmap{?key,size,zoom,center}'
template.expand key: 'foo', size: [200, 400], zoom: 5, center: [200, 9]
# => <Addressable::URI:0x3ffb7b824dd8 URI:http://open.mapquestapi.com/staticmap/v4/getmap?key=foo&size=200,400&zoom=5&center=200,9>
template.expand size: [200, 400], center: [200, 9]
# => <Addressable::URI:0x3ffb7b801ce8 URI:http://open.mapquestapi.com/staticmap/v4/getmap?size=200,400&center=200,9>
template.expand size: [200, 400]
# => <Addressable::URI:0x3ffb7a1d3714 URI:http://open.mapquestapi.com/staticmap/v4/getmap?size=200,400>
@maxlinc
maxlinc / draft4.json
Last active August 29, 2015 14:04
ZSchema bug?
{
"id": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
@maxlinc
maxlinc / current.yaml
Last active August 29, 2015 14:04
examples
---
examples:
application/json:
category:
name: domestic
id: 9
name: monster
status: alive
tags:
-
{
"request": {
"headers": {
},
"http_method": "get",
"path": "/api/album/{id}/cover"
},
"response": {
"headers": {
"Content-Type": "application/json"
@maxlinc
maxlinc / delete_webhook.json
Created August 15, 2014 21:14
Pitchfork db structure
{
"_id" : ObjectId("528f67f1192a8b5ae48ebed9"),
"add_to_header" : false,
"api_uri" : "{ddi}/groups/{group_id}/policies/{policy_id}/webhooks/{webhook_id}",
"custom_header_key" : "",
"custom_header_value" : "",
"data_object" : "",
"doc_url" : "http://docs.rackspace.com/cas/api/v1.0/autoscale-devguide/content/DELETE_deleteWebhook_v1.0__tenantId__groups__groupId__policies__policyId__webhooks__webhookId__Webhooks.html",
"short_description" : "Delete the specified webhook from the specfied policy on the specified scaling group",
"tested" : true,
@maxlinc
maxlinc / autoscale.wadl
Last active August 29, 2015 14:09
Autoscale WADL (XML) vs Swagger (YAML)
<?xml version="1.0" encoding="utf-8"?>
<!--*******************************************************-->
<!-- Import Common XML Entities -->
<!-- -->
<!-- You can resolve the entites with xmllint -->
<!-- -->
<!-- xmllint -noent autoscale.wadl -->
<!--*******************************************************-->
<!-- need xmlns:identity to use &commonFaults; &postPutFaults; &listGroupFaults; &createGroupFaults;
&showGroupDetailsFaults; &deleteGroupFaults; &deleteGroupServerFaults; &getGroupStateFaults; &getGroupConfigurationFaults; &updateGroupConfigurationFaults;