Skip to content

Instantly share code, notes, and snippets.

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

Gonzalo Serrano gonzaloserrano

☁️
🧑‍💻
View GitHub Profile
@gonzaloserrano
gonzaloserrano / log.go
Created August 18, 2015 17:56
logrus wrapper
package log
import (
"fmt"
"github.com/Sirupsen/logrus"
"runtime"
"strings"
)
var logger = logrus.New()
╭─[9:16:30] gonzalo@tribe/~/.vim/bundle/cpsm
( master: ✔
╰─○ otool -L $(which vim)
/usr/local/bin/vim:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 21.0.0)
/usr/local/lib/liblua.5.2.dylib (compatibility version 5.2.0, current version 5.2.3)
/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/libperl.dylib (compatibility version 5.18.0, current version 5.18.2)
╭─[9:14:29] gonzalo@tribe/~/.vim/bundle/cpsm
( master: ✔
╰─○ sh install.sh
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
### 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
<?php
require_once 'vendor/autoload.php';
$localTable = [
["X", "Y"],
["X", "X"],
["X", "X"],
];
$remoteTable = [
<?php
require_once 'vendor/autoload.php';
$localTable = [
["fd", "df"],
["fd", "fd"],
[null, "fd"],
["fd", null],
];
<?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 = [
['col1', 'col2', 'col3', 'col4', 'col5'],
[0, 0, 0, 0, 0]
];
$remoteTable = [
@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 = [