Skip to content

Instantly share code, notes, and snippets.

View gonzaloserrano's full-sized avatar
☁️
🧑‍💻

Gonzalo Serrano gonzaloserrano

☁️
🧑‍💻
View GitHub Profile
@gonzaloserrano
gonzaloserrano / vim.rb
Last active August 29, 2015 14:14 — forked from bartkozal/vim.rb
require "formula"
class Vim < Formula
homepage "http://www.vim.org/"
url 'https://vim.googlecode.com/hg/', :revision => 'cd5eff09c1ae'
version '7.4.622'
# We only have special support for finding depends_on :python, but not yet for
# :ruby, :perl etc., so we use the standard environment that leaves the
# PATH as the user has set it right now.
require 'formula'
class UnsupportedPhpApiError < RuntimeError
def initialize
super "Unsupported PHP API Version"
end
end
class InvalidPhpizeError < RuntimeError
def initialize(installed_php_version, required_php_version)
@gonzaloserrano
gonzaloserrano / gist:07948738bd3abc91545b
Created March 2, 2015 15:58
daff-php broken example
<?php
require_once 'vendor/autoload.php';
$localTable = [
['col1', 'col2', 'col3', 'col4', 'col5', 'col6'],
[0, 0, 0, 0, 1, 0]
];
$remoteTable = [
<?php
require_once 'vendor/autoload.php';
$localTable = [
['col1', 'col2', 'col3', 'col4', 'col5'],
[0, 0, 0, 0, 0]
];
$remoteTable = [
<?php
require_once 'vendor/autoload.php';
$localTable = [
[ "A", "new_column_2" ],
[ "dfdf", null ],
[ null, null ],
[ "xxx", null ],
[ "yyy", null ],
<?php
require_once 'vendor/autoload.php';
$localTable = [
["fd", "df"],
["fd", "fd"],
[null, "fd"],
["fd", null],
];
<?php
require_once 'vendor/autoload.php';
$localTable = [
["X", "Y"],
["X", "X"],
["X", "X"],
];
$remoteTable = [
### DML ###
# Keyspace Name
keyspace: stresscql
# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
CREATE KEYSPACE stresscql WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
# Table name