Skip to content

Instantly share code, notes, and snippets.

View gergoerdosi's full-sized avatar

Gergő Erdősi gergoerdosi

  • Budapest, Hungary
View GitHub Profile
class php::params {
$short_version = $version ? {
/^5\.3/ => '53',
/^5\.4/ => '54',
}
$url = "http://www.php.net/get/php-${version}.tar.gz/from/hu1.php.net/mirror"
$configure = "\
--prefix=/usr/share/php${short_version}\
class php::install {
package { 'build-essential':
ensure => installed,
}
package { [ 'libxml2-dev', 'libpcre3-dev', 'libbz2-dev', 'libcurl4-openssl-dev', 'libjpeg-dev', 'libpng12-dev', 'libxpm-dev', 'libfreetype6-dev', 'libmysqlclient-dev', 'libt1-dev', 'libgd2-xpm-dev', 'libgmp-dev', 'libsasl2-dev', 'libmhash-dev', 'freetds-dev', 'libpspell-dev', 'libsnmp-dev', 'libtidy-dev', 'libxslt1-dev', 'libmcrypt-dev' ]:
ensure => installed,
}
define source(
@gergoerdosi
gergoerdosi / percona-server-update.patch
Created May 9, 2012 11:44
Percona Server - Update to version 5.5.22-25.2
diff --git a/Library/Formula/percona-server.rb b/Library/Formula/percona-server.rb
index d6c2f54..365e2b5 100644
--- a/Library/Formula/percona-server.rb
+++ b/Library/Formula/percona-server.rb
@@ -1,10 +1,10 @@
require 'formula'
class PerconaServer < Formula
- url 'http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.15-21.0/source/Percona-Server-5.5.15-rel21.0.tar.gz'
@gergoerdosi
gergoerdosi / percona-cmakecache-1.log
Created May 5, 2012 09:34
Percona Server installation log - cmakecache - 1
# This is the CMakeCache file.
# For build in directory: /tmp/homebrew-percona-server-5.5.15-21.0-9dJN/Percona-Server-5.5.15-rel21.0
# It was generated by CMake: /usr/local/Cellar/cmake/2.8.8/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
@gergoerdosi
gergoerdosi / percona-brew-install-1.log
Created May 5, 2012 09:34
Percona Server installation log - brew install - 1
$ brew install -v percona-server
==> Downloading http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.15-21.0/source/Percona-Server-5.5.15-rel21.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/percona-server-5.5.15-21.0.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/percona-server-5.5.15-21.0.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file scripts/mysqld_safe.sh
Hunk #1 succeeded at 555 (offset 172 lines).
patching file scripts/mysql_config.sh
Hunk #1 succeeded at 137 (offset 5 lines).
@gergoerdosi
gergoerdosi / percona-cmakecache-2.log
Created May 5, 2012 09:31
Percona Server installation log - cmakecache - 2
# This is the CMakeCache file.
# For build in directory: /tmp/homebrew-percona-server-5.5.15-21.0-AWNA/Percona-Server-5.5.15-rel21.0
# It was generated by CMake: /usr/local/Cellar/cmake/2.8.8/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
@gergoerdosi
gergoerdosi / percona-brew-install-2.log
Created May 5, 2012 09:29
Percona Server installation log - brew install - 2
$ brew install -v percona-server
==> Downloading http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.15-21.0/source/Percona-Server-5.5.15-rel21.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/percona-server-5.5.15-21.0.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/percona-server-5.5.15-21.0.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file scripts/mysqld_safe.sh
Hunk #1 succeeded at 555 (offset 172 lines).
patching file scripts/mysql_config.sh
Hunk #1 succeeded at 137 (offset 5 lines).
diff --git a/code/libraries/koowa/model/state.php b/code/libraries/koowa/model/state.php
index aa037e5..56264f6 100644
--- a/code/libraries/koowa/model/state.php
+++ b/code/libraries/koowa/model/state.php
@@ -182,14 +182,14 @@ class KModelState extends KModelAbstract
if($unique)
{
//Unique values cannot be null or an empty string
- if($state->unique && (!empty($state->value) || is_numeric($state->value)))
@gergoerdosi
gergoerdosi / gist:1021437
Created June 12, 2011 10:59
Patch to fix a bug in KTemplateAbstract->loadString()
Index: code/libraries/koowa/template/abstract.php
===================================================================
--- code/libraries/koowa/template/abstract.php (revision 3467)
+++ code/libraries/koowa/template/abstract.php (working copy)
@@ -10,74 +10,74 @@
/**
* Abstract Template class
- *
+ *
@gergoerdosi
gergoerdosi / gist:1014478
Created June 8, 2011 14:07
Patch to fix editor buttons
Index: code/administrator/components/com_default/templates/helpers/editor.php
===================================================================
--- code/administrator/components/com_default/templates/helpers/editor.php (revision 3453)
+++ code/administrator/components/com_default/templates/helpers/editor.php (working copy)
@@ -45,6 +45,6 @@
$editor = KFactory::get('lib.joomla.editor', array($config->editor));
$options = KConfig::toData($config->options);
- return $editor->display($config->name, $config->{$config->name}, $config->width, $config->height, $config->cols, $config->rows, $config->buttons, $options);
+ return $editor->display($config->name, $config->{$config->name}, $config->width, $config->height, $config->cols, $config->rows, KConfig::toData($config->buttons), $options);