Skip to content

Instantly share code, notes, and snippets.

View zachflower's full-sized avatar
💾

Zachary Flower zachflower

💾
View GitHub Profile
class Hello
def self.world
puts "Hello, world!"
end
end
@zachflower
zachflower / Vagrantfile
Created October 6, 2017 21:30
Standard Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# bring in the vagrant dependency manager
require File.dirname(__FILE__) + "/dependency_manager"
# make sure the following plugins are installed (managed using dependency manager above)
check_plugins ["vagrant-exec", "vagrant-hostmanager", "vagrant-triggers"]
Vagrant.configure(2) do |config|
void log_event( const char* title, const char* level, const char* message ) {
char *payload;
char url[MAX_STRING_LENGTH];
json_t *obj = json_array();
json_t *event = json_object();
json_t *data = json_object();
if ( NETUITIVE_USERNAME != NULL && NETUITIVE_PASSWORD != NULL ) {
json_object_set_new(event, "title", json_string( title ));
void curl_json_push(const char* url, const char* payload, const char* method, const char* username, const char* password) {
pid_t pid;
curl_global_init(CURL_GLOBAL_ALL);
pid = fork();
if ( pid == 0 ) {
CURL *curl;
struct curl_slist *headers = NULL;
@zachflower
zachflower / kubernetes-deploy.sh
Created October 6, 2016 20:06
Codeship Kubernetes Deploy
#!/bin/bash
set -e
# authenticate to google cloud
codeship_google authenticate
# set compute zone
gcloud config set compute/zone us-central1-a
@zachflower
zachflower / codeship-steps.yml
Created August 24, 2016 06:22
Codeship Steps w/ Deploy
- type: serial
steps:
- type: serial
steps:
- service: build
command: composer install --prefer-source --no-interaction
- type: parallel
steps:
- service: test
command: vendor/bin/phpunit tests/Auth/
@zachflower
zachflower / codeship-systems.yml
Last active August 24, 2016 06:47
Codeship Multiple Services
build:
build:
image: app
dockerfile_path: Dockerfile
cached: true
volumes_from:
- data
test:
build:
image: app
@zachflower
zachflower / codeship-steps.yml
Last active September 29, 2016 18:12
Codeship Parallel Tests
- type: parallel
steps:
- service: app
command: vendor/bin/phpunit tests/Auth/
- service: app
command: vendor/bin/phpunit tests/Broadcasting/
- service: app
command: vendor/bin/phpunit tests/Bus/
- service: app
command: vendor/bin/phpunit tests/Cache/
@zachflower
zachflower / codeship-steps.yml
Last active August 24, 2016 06:49
Codeship Steps
- type: parallel
steps:
- service: app
command: vendor/bin/phpunit
@zachflower
zachflower / codeship-services.yml
Last active August 24, 2016 06:49
Codeship Services
app:
build:
image: app
dockerfile_path: Dockerfile
cached: true