Saturday, October 31, 2015

Nodejs v5 on ubuntu 14.04




# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v
v5.0.0

How to add column descriptions (comments) in Doctrine2

You can add a comment to a column name or entire table with the "options" argument to the annotation; eg:
/**
 * @ORM\Column(type="string", options={"comment":"The string to show in the dropdown "})
 */
for a column, or for a table:
/**
 * @ORM\Entity
 * @ORM\Table(name="application", options={"comment":"Funding applications"});
 */
Note however this will not add comments to an existing table or column, you have to delete the table from the DB and rebuild it. If it's just adding comments, you could rename the table, create the new table, and import data from the original.

Monday, October 26, 2015

Disable internet connection from terminal!

The following command works for me like a charm if I want to disable any internet connection from terminal:

nmcli nm enable false

To enable it again:

nmcli nm enable true

Tuesday, August 25, 2015

Truncate logs

truncate logfile --size 0

Mysql

SET GLOBAL slow_launch_time = 1;
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL log_queries_not_using_indexes = 'ON';
SET GLOBAL slow_query_log_file ='/var/lib/mysql/slow-query-log.log';
SET GLOBAL long_query_time = 1;
SHOW VARIABLES LIKE '%slow%';

#FLUSH LOGS;


SHOW GLOBAL STATUS LIKE 'Connections';
SHOW GLOBAL STATUS LIKE 'Threads_created';
SHOW GLOBAL STATUS LIKE 'Max_used_connections';

#Threads_created / Connections > 0.01
#increase thread_cache_size where thread_cache_size > Max_used_connections

Saturday, July 18, 2015

How To Properly Upgrade from Mint 17.1 (Rebecca) To Linux Mint 17.2 (Rafaela)

sudo apt-get update
sudo apt-get dist-upgrade
sudo cp /etc/apt/sources.list.d/official-package-repositories.list{,.bak}
sudo sed -i 's/rebecca/rafaela/g' /etc/apt/sources.list.d/official-package-repositories.list
sudo apt-get update
sudo apt-get dist-upgrade




Friday, July 17, 2015

optipng

sudo apt-get install optipng
optipng -i1 -o7 -v -full -sim pic.png

Tuesday, June 30, 2015

Ferrari Red

http://www.99colors.net/name/ferrari-red

BMW K 100 “My BITCH” – Puzzle Garage

http://www.caferacerculture.it/bmw-k-100-my-bitch-puzzle-garage/

BMW K 100 “My BITCH” – Puzzle Garage


“My BITCH” special su base BMW K100 creata da ALESSANDRO DELL’ UNTO del PUZZLE GARAGE .

Interventi principali sono stati la strumentazione Micro, la colorazione del serbatoio con nero Candy e preparazione tramite smerigliatura, verniciatura cerchi e telaio,ricostruzione totale del telaio sia nella parte centrale che nella parte posteriore, se la fatta su misura, faro e stop modello beates, manubrio drag bar, manopole in alluminio, gruppo pedane in alluminio, tappo EX MISANO, collettore in acciaio EX, scarico mini cannon, impianto elettrico riposizionato, soffietti Ariete.

 

Puzzle Garage FB

 

image2 (7) image1 (2) image1 (3) image1 (4) image1 (5) image1 (6) image1 (7) image1 image2 (2) image2 (3) image2 (4) image2 (5) image2 (6) image2 (7) image2 image3 (2) image3 (3) image3 (4) image3 (5) image3 (6) image3

 

 

 

SHARING facebooktwittergoogle_plusredditpinterestlinkedinmail

Lascia un commento

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


http://www.caferacerculture.it/ducati-monster-1000-cafe-racer-project-otomotif/

http://www.caferacerculture.it/custom-s2r-800-caferacer/

http://www.caferacerculture.it/custom-s2r-800-caferacer/


DUCATI Custom s2r 800 Caferacer


Hi. This is my latest build. It’s a 2005 Ducati s2r 800 modified by me into a modern Cafe Racer .
The bike was dirty and looking very old when it came to me. It was torn to pieces ,cleaned ,powder coated. I’ve made a custom open exhaust ,custom mono seat cover, custom top yoke ,etc. This is it finished
1 2 3 4 5a 6 7 8


Tell us about your custom build…

Cafè Racer Culture, is always looking for new Special Motorcycles.
No matter if they are made in a professional or in a genuine home garage. Send us pics of your work at rudebarber@gmail.com and we will add to the site.

Inviateci le vostre foto…

Cafè Racer Culture è sempre alla ricerca di Moto Special.
Non importa se sono fatte in officine professionali o in garage genuini e casalinghi. Inviateci le foto a rudebarber@gmail.com e le pubblicheremo sul nostro sito.

rudebarber@gmail.com

SHARING facebooktwittergoogle_plusredditpinterestlinkedinmail

Lascia un commento

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *
È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



https://www.youtube.com/watch?v=vVFWHp5rhzs

Friday, June 19, 2015

mod_rewrite to remove .php extension AND preserve GET parameters

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
#RewriteRule ^ %1 [R=302,L]
RewriteRule ^ %1 [R=301,L]

# To internally forward /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]

Thursday, May 07, 2015

Some effect with datatables

.highlight{
    background-color: rgba(255, 200, 50, 0.1) !important;
}
tbody tr:hover {
    background-color: rgba(255, 200, 50, 0.1) !important; 
}







$(document).ready(function() {
    var lastIdx = null;
    var table = $('table').DataTable();
    $('table tbody')
            .on( 'mouseover', 'td', function () {
                var colIdx = table.cell(this).index().column;

                if ( colIdx !== lastIdx ) {
                    $( table.cells().nodes() ).removeClass( 'highlight' );
                    $( table.column( colIdx ).nodes() ).addClass( 'highlight' );
                }
            } )
            .on( 'mouseleave', function () {
                $( table.cells().nodes() ).removeClass( 'highlight' );
            } );
} );


sudo update-alternatives --config x-cursor-theme