Skip to content

Instantly share code, notes, and snippets.

Avatar

Zachary Flower zachflower

View GitHub Profile
View syntax-highlighting-example.rb
class Hello
def self.world
puts "Hello, world!"
end
end
@zachflower
zachflower / Vagrantfile
Created Oct 6, 2017
Standard Vagrantfile
View 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|
View log_event.c
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 ));
View curl_json_push.c
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 Oct 6, 2016
Codeship Kubernetes Deploy
View kubernetes-deploy.sh
#!/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 Aug 24, 2016
Codeship Steps w/ Deploy
View codeship-steps.yml
- 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 Aug 24, 2016
Codeship Multiple Services
View codeship-systems.yml
build:
build:
image: app
dockerfile_path: Dockerfile
cached: true
volumes_from:
- data
test:
build:
image: app
@zachflower
zachflower / codeship-steps.yml
Last active Sep 29, 2016
Codeship Parallel Tests
View codeship-steps.yml
- 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/
View codeship-steps.yml
- type: parallel
steps:
- service: app
command: vendor/bin/phpunit
View codeship-services.yml
app:
build:
image: app
dockerfile_path: Dockerfile
cached: true
You can’t perform that action at this time.