Skip to content

Instantly share code, notes, and snippets.

View domenicomonaco's full-sized avatar
🎯
Focusing

Domenico Monaco domenicomonaco

🎯
Focusing
View GitHub Profile
<?php
//simple example of recursive require and read *.ext of files
$dir = "./path_file/"; //Set dir
$dh = opendir($dir);
while (($file = readdir($dh)) !== false) {
$fExt= end(explode(".", $file));
if ($fExt=='php'){ //if ext of file is php or other *.ext
// Based on apidock.org Ubiquity Search: http://gist.github.com/8132
CmdUtils.CreateCommand(
{
name: "github",
takes: {"function": noun_arb_text},
icon: "http://github.com/fluidicon.png",
homepage: "http://tiago.zusee.com",
author: {name: "Tiago Bastos", email: "comechao@gmail.com"},
license: "MPL,GPL",
description: "Search on Github Code Search",
<?php
/**
* Campaign Monitor Behavior class file.
*
* @filesource
* @author Craig Morris
* @link http://waww.com.au/campaign-monitor-behavior
* @version 0.1
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @package app
User@Computer:~$ sudo /etc/init.d/vboxdrv setup
python manage.py runserver_plus
python manage.py reset_db --router=default
python manage.py syncdb
@domenicomonaco
domenicomonaco / gist:628129
Created October 15, 2010 12:52
Python Envrioment & Django
sudo apt-get install apache2 libapache2-mod-php5 php5-gd
sudo apt-get install libapache2-mod-security php5-ldap php5-odbc
sudo apt-get install openssh-server unattended-upgrades
sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es
sudo apt-get install curl php5-curl php5-xmlrpc
sudo apt-get install clamav-base clamav-freshclam clamav
sudo apt-get install mysql-server php5-mysql
@domenicomonaco
domenicomonaco / Linux - ImageMagick
Created October 16, 2010 07:36
Ridimensionare molte immagini con Ubuntu Gnu/Linux - ImageMagick
sudo apt-get install imagemagick
cd /home/user/photos/Vacanze
mkdir ridimensionate
cp /home/user/photos/Vacanze/* /home/user/photos/Vacanze/ridimensionate/
cd ridimensionate
mogrify -resize 640 *.jpg
mogrify -resize 640×480 *.jpg
@domenicomonaco
domenicomonaco / Apache
Created October 20, 2010 14:59
Apache
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start
or
sudo /etc/init.d/apache2 restart
@domenicomonaco
domenicomonaco / gist:653258
Created October 29, 2010 09:59
Local_Setting_Python
#
# You can put any custom options you would normally want in settings.py into
# this file. If you want to add middleware or applications, precede a setting
# name with "EXTRA_".
# Use a local PostgreSQL database.
DATABASE_ENGINE = 'postgresql_psycopg2'
DATABASE_NAME = ''
DATABASE_USER = ''
DATABASE_PASSWORD = ''