Skip to content

Instantly share code, notes, and snippets.

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

Gonzalo Serrano gonzaloserrano

☁️
🧑‍💻
View GitHub Profile
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 / 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.
@gonzaloserrano
gonzaloserrano / gist:e3cd6a4307b7d9c8e26c
Last active August 29, 2015 14:13
phpredis reconnection failing test
<?php
// redis docker containers
$serversList = array(
'redis1',
'redis2',
'redis3',
'redis4',
'redis5',
);
local cache_key = KEYS[1]
redis.log(redis.LOG_NOTICE, type(KEYS))
redis.log(redis.LOG_NOTICE, KEYS[1])
redis.log(redis.LOG_NOTICE, KEYS[2])
for key in KEYS do
redis.log(redis.LOG_NOTICE, "here")
redis.log(redis.LOG_NOTICE, key)
end
@gonzaloserrano
gonzaloserrano / gist:ca4c3ab2298aa72f1454
Created December 4, 2014 16:03
readable debug_backtrace
$callStack = rtrim(array_reduce(
array_reverse(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)),
function ($result, $call) {
return $result .= (isset($call['class']) ? $call['class'] . ':' : '') . $call['function'] . ' -> ';
}
), ' -> ') . "\n";
gonzalo@tribe $ brew reinstall --build-from-source --cc=gcc-4.9 boost gflags glog
==> Reinstalling boost
==> Downloading https://downloads.sourceforge.net/project/boost/boost/1.56.0/boost_1_56_0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/boost-1.56.0.tar.bz2
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.56.0 --libdir=/usr/local/Cellar/boost/1.56.0/lib --without-icu --without
==> ./b2 --prefix=/usr/local/Cellar/boost/1.56.0 --libdir=/usr/local/Cellar/boost/1.56.0/lib -d2 -j4 --layout=tagged --user-co
🍺 /usr/local/Cellar/boost/1.56.0: 10471 files, 526M, built in 18.3 minutes
==> Reinstalling gflags
==> Downloading https://gflags.googlecode.com/files/gflags-2.0.tar.gz
@gonzaloserrano
gonzaloserrano / gist:8f9841fe0c364b0e67d1
Last active August 29, 2015 14:07
Trello CSS tunning for Week tasks
.list {
flex: 0 0 200px;
}
.list:first-child {
flex: 0 0 250px;
background: #D2CEE6;
}
.list:nth-last-child(3) {
#! /bin/sh
TMPPATH='/tmp/jsons'
if [ $2 ]
then
scp jh1:~/$1/src/SP/JurassicHunter/Resources/Configuration/data/$2.json $TMPPATH/$2_$1.json
scp jh1:~/$1/src/SP/JurassicHunter/Resources/Configuration/metadata/$2.json $TMPPATH/$2_metadata_$1.json
else
rm -rf $TMPPATH/$1
mkdir -p $TMPPATH/$1
gonzalo@tribe ~ $ brew install https://raw.github.com/MSch/homebrew/master/Library/Formula/wxmac.rb --disable-monolithic
######################################################################## 100.0%
==> Downloading http://downloads.sourceforge.net/project/wxpython/wxPython/2.9.5.0/wxPython-src-2.9.5.0.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/wxmac/2.9.5.0 --enable-shared --enable-unicode --enable-std_string --enable-display
==> make install
Warning: Formula#python is deprecated and will go away shortly.
Warning: Formula#python is deprecated and will go away shortly.
==> python setup.py build_ext WXPORT=osx_cocoa WX_CONFIG=/usr/local/Cellar/wxmac/2.9.5.0/bin/wx-config UNICODE=1 INSTALL_MULTI
/usr/local/Cellar/wxmac/2.9.5.0/include/wx-2.9/wx/strvararg.h:26:14: fatal error: 'type_traits' file not found