Create an empty git repo or reinitialize an existing one
$ git init
<?php | |
echo 'Hello World'; | |
?> |
alert('Hello World'); |
$("#datetimepicker_start, #datetimepicker_finish").datetimepicker({ | |
format: 'h:mm a ddd D MMM' | |
}); | |
$("#datetimepicker_start").on("dp.change", function (e) { | |
$('#datetimepicker_finish').data("DateTimePicker").minDate(e.date); | |
}); | |
$("#datetimepicker_finish").on("dp.change", function (e) { | |
$('#datetimepicker_start').data("DateTimePicker").maxDate(e.date); | |
}); |
<?php | |
$ammended_start = DateTime::createFromFormat('g:i a D j M', Request::input('ammended_start_' . $time_ammendments_id))->getTimeStamp(); | |
$ammended_finish = DateTime::createFromFormat('g:i a D j M', Request::input('ammended_finish_' . $time_ammendments_id))->getTimeStamp(); | |
$date1 = new DateTime(date("Y-m-d H:i:s", $v->start_timestamp)); | |
$date2 = new DateTime(date("Y-m-d H:i:s", $v->finish_timestamp)); | |
$diff = $date2->diff($date1); | |
$elapsed = $diff->format('%a days %h hours %i minutes %S seconds'); | |
?> |
Mac OSX development: | |
- composer | |
- sublime text 2 | |
- PHP Storm | |
- Source Tree | |
- Spotify | |
- Slack | |
- GistBox | |
- Transmit |
// check if checkbox is checked | |
if ($("#toggle_start").is(':checked')) { | |
var datetimepicker_start = $("#datetimepicker_start").val(); | |
} else { | |
var datetimepicker_start = 'disabled'; | |
} |
Create an empty git repo or reinitialize an existing one
$ git init
First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:
sudo lsof | grep LISTEN
If you do happen to have any process with something like this *:http (LISTEN)
, you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)
ps <pid of that process>
If you don't see MAMP, you are in good hands, I have just the thing for you:
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
# fetch the changes from the remote | |
git fetch origin | |
# show commit logs of changes | |
git log master..origin/master | |
# show diffs of changes | |
git diff master..origin/master | |
# apply the changes by merge.. |