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
To make Composer (globally) available on Debian: | |
$ sudo su | |
$ cd /usr/src | |
$ apt-get install curl php5-cli | |
$ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
Verify installation: | |
$ composer --version |
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
function calc_time_diff($timestamp, $unit = NULL, $show_unit = TRUE) { | |
$seconds = round((time() - $timestamp)); // How many seconds have elapsed | |
$minutes = round((time() - $timestamp) / 60); // How many minutes have elapsed | |
$hours = round((time() - $timestamp) / 60 / 60); // How many hours have elapsed | |
$days = round((time() - $timestamp) / 60 / 60 / 24); // How many hours have elapsed | |
$seconds_string = $seconds; | |
$minutes_string = $minutes; | |
$hours_string = $hours; | |
$days_string = $days; | |
switch($unit) { |
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
composer create-project fabpot/silex-skeleton -sdev |
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
$("select>option").each( function(){ | |
var $option = $(this); | |
$option.siblings() | |
.filter( function(){ return $(this).val() == $option.val() } ) | |
.remove() | |
}); |
NewerOlder