Skip to content

Instantly share code, notes, and snippets.

View wdalmut's full-sized avatar
💭
Fantasy Land

Walter Dal Mut wdalmut

💭
Fantasy Land
View GitHub Profile
@wdalmut
wdalmut / gist:5126137
Created March 9, 2013 22:50
Zend\Form Doctrine2 - Field from Entity
<?php
namespace BlogModule\Form;
use \Zend\Form\Form;
class Post extends Form
{
private $entityManager;
public function init()
@wdalmut
wdalmut / README.markdown
Last active December 14, 2015 04:29
Chef-solo submodules web apps

Submodule opscode cookbooks

Base web application cookbooks

@wdalmut
wdalmut / README.markdown
Last active June 8, 2020 13:33
Git log

Git Log --pretty

Display git history in a pretty way.

git lg

git lg -p

@wdalmut
wdalmut / run-tags.sh
Created February 5, 2013 21:07
Run ctags 4 php
ctags \
-f ~/.tags \
-h ".php" -R \
--exclude="\.svn" \
--totals=yes \
--tag-relative=yes \
--PHP-kinds=+ivcf \
--regex-PHP='/(abstract)?\s+class\s+([^ ]+)/\2/c/' \
--regex-PHP='/(static|abstract|public|protected|private)\s+function\s+(\&\s+)?([^ (]+)/\3/f/' \
--regex-PHP='/interface\s+([^ ]+)/\1/i/' \
@wdalmut
wdalmut / memcache-stat.sh
Created February 2, 2013 18:22
Memcache shell stats
echo stats | nc 127.0.0.1 11211
'router' => array(
'routes' => array(
'restful' => array(
'type' => 'Zend\Mvc\Router\Http\Segment',
'options' => array(
'route' => '/rest[/:formatter]',
'constraints' => array(
'formatter' => '[a-zA-Z0-9_-]*',
),
),
@wdalmut
wdalmut / build.sh
Created December 11, 2012 22:14 — forked from igorw/build.sh
#!/bin/bash
# Amazing static site generator
# Works for PHP and HTML sites
# Assumes web root to be in /web
# Dumps the site into a directory named "static"
PORT=9999
php -S localhost:$PORT -t web >/dev/null &
PID=$!
@wdalmut
wdalmut / my-upcloo.css
Created November 23, 2012 20:14
UpCloo simple inline CSS example
div.upcloo-suggest-widget>ul>li.upcloo-inline-title{
background:#F1F1F1;
font-size:1.2em;
border-bottom:1px solid black;
font-weight:bold;letter-spacing:2px;
}
div.upcloo-suggest-widget>ul>li>a{
font-size:1.05em;
padding-left: 15px;
@wdalmut
wdalmut / split.sh
Created November 6, 2012 16:34
Move big list of files into different directories
for i in 0 1 2 3 4 5 6 7 8 9; do
mkdir -p $i;
done
for i in *.xml ; do
for ii in 0 1 2 3 4 5 6 7 8 9; do
mv ./$i ./$ii/$i
break
done
done
@wdalmut
wdalmut / .gitignore
Created October 31, 2012 17:57
Properties Skeleton
build.properties