Skip to content

Instantly share code, notes, and snippets.

View pascaldevink's full-sized avatar
💭
Recruiters: stop looking at my profile

Pascal de Vink pascaldevink

💭
Recruiters: stop looking at my profile
View GitHub Profile
if (!args) {
println "Usage: <path_to_directory>"
println "And: <existance of extensions.txt comma separated values file with file extensions to convert>"
return
}
Convert c = new Convert()
c.convert(args[0])
emailSignupfalseorg.springframework.validation.FieldErrornullableSignup.email.nullable.error.Signup.emailSignup.email.nullable.error.emailSignup.email.nullable.error.java.lang.StringSignup.email.nullable.errorsignup.email.nullable.error.Signup.emailsignup.email.nullable.error.emailsignup.email.nullable.error.java.lang.Stringsignup.email.nullable.errorSignup.email.nullable.Signup.emailSignup.email.nullable.emailSignup.email.nullable.java.lang.StringSignup.email.nullablesignup.email.nullable.Signup.emailsignup.email.nullable.emailsignup.email.nullable.java.lang.Stringsignup.email.nullablenullable.Signup.emailnullable.emailnullable.java.lang.StringnullableProperty [{0}] of class [{1}] cannot be nullemailSignupinfixSignupfalseorg.springframework.validation.FieldErrornullableSignup.infix.nullable.error.Signup.infixSignup.infix.nullable.error.infixSignup.infix.nullable.error.java.lang.StringSignup.infix.nullable.errorsignup.infix.nullable.error.Signup.infixsignup.infix.nullable.error.infixsignup.infix.nullable.erro
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="users"
xmlns:hippo="http://www.onehippo.org/jcr/hippo/nt/2.0"
xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:namespace</sv:value>
</sv:property>
<sv:property sv:name="jcr:mixinTypes" sv:type="Name">
<sv:value>mix:referenceable</sv:value>
</sv:property>
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="users"
xmlns:hippo="http://www.onehippo.org/jcr/hippo/nt/2.0"
xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:namespace</sv:value>
</sv:property>
<sv:property sv:name="jcr:mixinTypes" sv:type="Name">
<sv:value>mix:referenceable</sv:value>
</sv:property>
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="users"
xmlns:hippo="http://www.onehippo.org/jcr/hippo/nt/2.0"
xmlns:sv="http://www.jcp.org/jcr/sv/1.0">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:namespace</sv:value>
</sv:property>
<sv:property sv:name="jcr:mixinTypes" sv:type="Name">
<sv:value>mix:referenceable</sv:value>
</sv:property>
def save = {
def sdfh = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
params.signupdate = sdfh.parse(params.signupdate)
def u = new Signup()
u.properties = params
if (u.save()) {
render u as XML
} else {
public function signupAction() {
$this->view->title = 'Signup';
$form = new SignupForm('/user/signup');
$this->view->formResponse = '';
if ($this->_request->isPost()) {
if ($form->isValid($_POST)) {
$signupdate = new Zend_Date();
$client = new Zend_Rest_Client('http://localhost:8080');
$data = array('surname'=>$this->_getParam('firstname'),
'infix'=>$this->_getParam('infix'),
<?php
function hanoi($plates, $from, $to) {
while($plates > 0) {
$using = 6 - ($from + $to);
hanoi(--$plates, $from, $using);
print "Move plate from $from to $to".PHP_EOL;
$from = $using;
}
}
Pundle - http://github.com/T-Moe/Pundle (Pear, Git and SVN)
Pearanha - http://www.whitewashing.de/blog/articles/125 (Includes PEAR instructions for manual PEAR dependency management)
@pascaldevink
pascaldevink / symfony-deploy-task-keyfile
Created November 17, 2010 15:21
Add support for custom keyfile names for the SSH command to use
Index: sfProjectDeployTask.class.php
===================================================================
--- sfProjectDeployTask.class.php (revision 79869)
+++ sfProjectDeployTask.class.php (working copy)
@@ -35,6 +35,7 @@
new sfCommandOption('go', null, sfCommandOption::PARAMETER_NONE, 'Do the deployment'),
new sfCommandOption('rsync-dir', null, sfCommandOption::PARAMETER_REQUIRED, 'The directory where to look for rsync*.txt files', 'config'),
new sfCommandOption('rsync-options', null, sfCommandOption::PARAMETER_OPTIONAL, 'To options to pass to the rsync executable', '-azC --force --delete --progress'),
+ new sfCommandOption('key-file', null, sfCommandOption::PARAMETER_OPTIONAL, 'Path to the key you want to use for the SSH connection (if not the standard key)'),
));