Skip to content

Instantly share code, notes, and snippets.

View joshavg's full-sized avatar

Josha von Gizycki joshavg

View GitHub Profile
@joshavg
joshavg / irc-response-regex
Last active December 28, 2017 23:16
Ruby Regex for IRC server responses
/^:?((?<nick>\S+)!(?<user>\S+)@)?(?<server>\S+)\s(?<cmd>\S+)\s((?<target>\S+)\s)?((?<target2>\S+)\s)?((:(?<payload>.+))|(?<params>.*))$/
@joshavg
joshavg / build.xml
Created April 17, 2015 13:53
symfony2 phing
<?xml version="1.0" encoding="UTF-8"?>
<project name="FIXME-Project-Name" default="">
<target name="rights">
<chown file="" user="www-data">
<fileset dir="app">
<include name="cache/**" />
<include name="logs/**" />
</fileset>
</chown>
<chmod file="" mode="0775">
@joshavg
joshavg / DatalistType.php
Created May 20, 2016 15:30
Datalist in Symfony
<?php
namespace Acme\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class DatalistType extends AbstractType
{