Skip to content

Instantly share code, notes, and snippets.

View abtris's full-sized avatar

Ladislav Prskavec abtris

View GitHub Profile
hudson.backup = /tmp/hudson-backup/
hudson.backup.filename = hudson-backup
hudson.backup.days = 30
hudson.home = /srv/hudson/hudson-home/
#set($HH = '##')
<?php
/**
* @package ${HH}PACKAGE${HH}
* @version ${HH}VERSION${HH}
* @author ${HH}AUTHOR${HH}
* @filesource
*/
/**
* @package ${HH}PACKAGE${HH}
@abtris
abtris / gist:703694
Created November 17, 2010 17:30
Capfile
require 'rubygems'
require 'railsless-deploy'
set :user, "testapp"
set :application, "test"
set :repository, "git@github.com:Vrtak-CZ/#{application}.git"
set :deploy_to, "/home/#{user}/web"
# set :document_root, "#{deploy_to}/current/document_root"
find . -type f -name '*class.php' | awk 'BEGIN { FS = "." } {print "svn mv " $0 " ." $2"."$4 }'
warning: updating the current branch
warning: Updating the currently checked out branch may cause confusion,
warning: as the index and work tree do not reflect changes that are in HEAD.
warning: As a result, you may see the changes you just pushed into it
warning: reverted when you run 'git diff' over there, and you may want
warning: to run 'git reset --hard' before starting to work to recover.
warning:
warning: You can set 'receive.denyCurrentBranch' configuration variable to
warning: 'refuse' in the remote repository to forbid pushing into its
warning: current branch.
@abtris
abtris / gist:876012
Created March 18, 2011 12:51
gitolite.conf
# configuration variables for gitolite
# PLEASE READ THE DOCUMENTATION BEFORE EDITING OR ASKING QUESTIONS
# ( http://github.com/sitaramc/gitolite/blob/pu/doc/gitolite.rc.mkd )
# this file is meant to be pulled into a perl program using "do" or "require".
# You do NOT need to know perl to edit the paths; it should be fairly
# self-explanatory and easy to maintain perl syntax :-)
# ------------------------------------------------------------------------------
@abtris
abtris / authors.php
Created March 21, 2011 12:15
Automatic conversion from SVN to GIT
function getEmailFromLdap($username)
{
# company specific get from LDAP
$ldap_con = ldap_connect($ldap_server) or die("Could not connect to server. Error is " . ldap_error($ldap_con));
$ldap_bd = ldap_bind($ldap_con, $ldap_bind_dn, $ldap_bind_pass) or die("Could not bind to server. Error is " .ldap_error($ldap_con));
$result = ldap_search($ldap_con, $ldap_base_dn, "(sAMAccountName=$username)") or die ("Error in query");
$data = ldap_get_entries($ldap_con, $result);
return strtolower($data[0]['mail'][0]);
}
@abtris
abtris / zend-mail-example
Created April 12, 2011 17:41
Mock Smtp example
<?php
require_once 'Zend/Mail.php';
require_once 'Zend/Mail/Transport/Smtp.php';
$config = array();
$config['host'] = "localhost";
$config['port'] = 1025;
$config['username'] = "";
$config['password'] = "";
@abtris
abtris / gist:1056003
Created June 30, 2011 10:50
Two columns by xslt
<dl class="fields">
<xsl:for-each select="fields/item/item[position()&lt;=floor(count(../item) div 2)]">
<dd><a href="{/doc/body/links/link[@id='Jobs_Academy']}{seourl}"><xsl:value-of select="name" /></a></dd>
</xsl:for-each>
<xsl:comment>
Cleaner
</xsl:comment>
</dl>
<dl class="fields">
@abtris
abtris / docblog.log
Created August 4, 2011 08:56
DocBlox Error
PHP Warning: preg_match(): Compilation failed: support for \P, \p, and \X has not been compiled at offset 150 in /srv/tomcat/php_docblox/src/DocBlox/Reflection/DocBlock.php on line 143
PHP Stack trace:
PHP 1. {main}() /srv/tomcat/php_docblox/bin/docblox.php:0
PHP 2. DocBlox_Core_Application->main() /srv/tomcat/php_docblox/bin/docblox.php:40
PHP 3. DocBlox_Task_Project_Run->execute() /srv/tomcat/php_docblox/src/DocBlox/Core/Application.php:47
PHP 4. DocBlox_Task_Project_Parse->execute() /srv/tomcat/php_docblox/src/DocBlox/Task/Project/Run.php:124
PHP 5. DocBlox_Parser->parseFiles() /srv/tomcat/php_docblox/src/DocBlox/Task/Project/Parse.php:283
PHP 6. DocBlox_Parser->parseFile() /srv/tomcat/php_docblox/src/DocBlox/Parser.php:507
PHP 7. DocBlox_Reflection_File->process() /srv/tomcat/php_docblox/src/DocBlox/Parser.php:413
PHP 8. DocBlox_Reflection_Abstract->parseTokenizer() /srv/tomcat/php_docblox/src/DocBlox/Reflection/File.php:361