Skip to content

Instantly share code, notes, and snippets.

@gtsafas
gtsafas / gist:1235778
Created September 22, 2011 19:32
Mojo make for pj
#hyp.conf
{pid_file => '/tmp/myapp.pid', local_file => '/tmp/myapp.lock'}
#makefile
#-----------------------------------------------------------------------------------
# installer + mgmt tool
#
#
CURL=sudo apt-get install curl
@gtsafas
gtsafas / gist:1219198
Created September 15, 2011 13:19
DBIx::Connector issue
my $con = DBIx::Connector->new("dbi:mysql:database=$db_admin_db;host=$db_admin_server;port=$db_port;mysql_socket=$socket_path", $db_admin_user, $db_admin_password,{ RaiseError => 1, AutoCommit => 1, mysql_auto_reconnect => 0 } );
my $emails = "";
$con->run(fixup => sub {
$emails = "";
my $sth = $_->prepare("select distinct U.email from applications T, users U where T.application=? and T.event=? and (U.access & (1<<(T.id-1)) <> 0) and U.client_of=?");
@gtsafas
gtsafas / gist:1067260
Created July 6, 2011 13:49
Monokai conversion
" Vim color file
" Converted from Textmate theme Monokai using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
1: /usr/share/vim/vimrc
2: /usr/share/vim/vim72/debian.vim
3: /usr/share/vim/vim72/syntax/syntax.vim
4: /usr/share/vim/vim72/syntax/synload.vim
5: /usr/share/vim/vim72/syntax/syncolor.vim
6: /usr/share/vim/vim72/filetype.vim
7: /home/gtsafas/.vimrc
8: /usr/share/vim/vim72/syntax/nosyntax.vim
9: /home/gtsafas/GIT/Vim/.vim/colors/jellybeans.vim
10: /home/gtsafas/GIT/Vim/.vim/plugin/BlockComment.vim