Skip to content

Instantly share code, notes, and snippets.

View desarrolla2's full-sized avatar
💭
Team Manager and Developer | PHP | Symfony.

Daniel González desarrolla2

💭
Team Manager and Developer | PHP | Symfony.
View GitHub Profile
@desarrolla2
desarrolla2 / Rand.php
Created November 28, 2011 11:39 — forked from Ocramius/Rand.php
MySQL RAND() function in Doctrine2 DQL
<?php
namespace My\Custom\Doctrine2\Function;
/**
* RandFunction ::= "RAND" "(" ")"
*/
class Rand extends FunctionNode
{
public function parse(\Doctrine\ORM\Query\Parser $parser)
@desarrolla2
desarrolla2 / .conkyrc
Created September 29, 2011 08:11
My conky configuration
background no
font Sans:size=10
xftfont Sans:size=10
use_xft yes
xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
@desarrolla2
desarrolla2 / .bashrc
Created September 16, 2011 11:36 — forked from henrik/.bashrc
Git branch and dirty state in Bash prompt.
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '