Skip to content

Instantly share code, notes, and snippets.

View sbuzonas's full-sized avatar

Steve Buzonas sbuzonas

View GitHub Profile
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
@sbuzonas
sbuzonas / nginx-cors.conf
Created September 8, 2015 15:36
Nginx CORS maps
map $http_origin $allow_origin {
default "";
"~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin";
}
map $request_method $cors_method {
default "allowed";
"OPTIONS" "preflight";
}
@sbuzonas
sbuzonas / gist:57cea59ed3dc5de02e54
Created June 22, 2015 11:12
Test script for github.com/composer/composer/issues/4121
<?php
$url = '';
$headers = array(
'User-Agent: DownloadTest',
'Accept-Encoding: gzip',
'Connection: close',
);
<?php
public function getInstaller($type)
{
// Plugin API 1.1
foreach ($pm->getCapabilities('Composer\Plugin\Capability\Installable') as $installCap) {
if ($installCap->supports($type)) {
return $installCap;
}
}
@sbuzonas
sbuzonas / README.md
Last active August 29, 2015 14:16 — forked from taylor/README.md

Introduction

ssh-srv-wrapper is bash shell script which tries to find a SSH SRV record for the first host and uses what is found rather than what was passed (if a valid record is found).

Install

Run the script directly or feel free to rename or symlink to the name ssh. It will look for another ssh in your path to execute.

@sbuzonas
sbuzonas / CurrentOptionA.php
Created February 6, 2015 00:50
CommandInterface suggestion
abstract class InstallationCommand extends Command
{
abstract public function install();
}
class MyInstaller extends InstallationCommand
{
public function install()
{
// do stuff
{
"name" : "kiriaze/PressPlay",
"description" : "Composer backed boilerplate project for easy WordPress sites",
"authors" : [
{
"name" : "Constantine Kiriaze",
"email" : "hello@kiriaze.com",
"homepage" : "http://kiriaze.com/"
# -*- mode: ruby; encoding: utf-8 -*-
COOKBOOK_REPO = File.expand_path('../', __FILE__)
# This method allows uncommitted cookbooks to be included
# Trade-off is install leaves these in place and vendor
# needs to be explicitly called to put all in a vendor path
def development_cookbook(name, version = '>=0.0.0', options = {})
cookbook name, version, { path: File.join(COOKBOOK_REPO, name) }.merge(options)
end
@sbuzonas
sbuzonas / gist:1bb2281cdff4d989d6da
Created September 29, 2014 04:41
Perl TTY input sample
#!/usr/bin/env perl
use strict;
my $name = &promptUser("What is your name", "Steve");
print 'Hello, ', $name, "!\n";
sub promptUser {
my ($promptString,$defaultValue) = @_;
@sbuzonas
sbuzonas / SassMeister-input-HTML.html
Created February 27, 2014 21:43
Generated by SassMeister.com.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CSS List Grouping Example</title>
</head>
<body>
<div class="container">