This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set @created_by = null; -- if the var is null, the comparison cant be with '=' | |
select * | |
from users | |
where | |
IF( | |
@created_by is null, users.created_by is null, -- both var and field are null | |
@created_by = users.created_by -- normal comparison, when var is not null | |
) | |
limit 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XVFB=/usr/bin/Xvfb | |
XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset" | |
PIDFILE=/var/run/xvfb.pid | |
case "$1" in | |
start) | |
echo -n "Starting virtual X frame buffer: Xvfb" | |
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS | |
echo "." | |
;; | |
stop) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage='Usage: ssh-tailf-notify <user@server> <logfile> [grep args] | |
Easy way to receive desktop notifications based on remote logfile-events or named pipes | |
examples crontab: | |
* * * * * nohup /home/you/bin/ssh-tailf-notify [email protected] /home/you/irclogs/fnotify.txt -vE "(foo|bar)" & | |
* * * * * nohup /home/you/bin/ssh-tailf-notify [email protected] /home/sqz/irclogs/EFnet/#python.log -vE "(mynick)" & | |
* * * * * nohup /home/you/bin/ssh-tailf-notify [email protected] /var/log/messages "-E (memory|booking)" & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Soap\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\Soap\AutoDiscover as SoapWsdlGenerator; | |
use Zend\Soap\Server as SoapServer; | |
class SoapController | |
{ |