This file contains 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
<a class="btn" data-toggle="modal" href="#myModal">Launch Modal</a> | |
<div class="modal hide" id="myModal"> | |
<div class="modal-header"> | |
<button class="close" data-dismiss="modal">×</button> | |
<h3>Modal header</h3> | |
</div> | |
<div class="modal-body"> | |
<p>One fine body…</p> |
This file contains 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
$clean = array(); | |
switch($_POST['color']) { | |
case 'red': | |
case 'green': | |
case 'blue' | |
$clean['color'] = $_POST['color']; | |
default: /*ERROR*/ | |
break; | |
} |
This file contains 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
<?php | |
error_log('A connection to the database could not be opened.', 1, '[email protected]'); //send error to email | |
error_log('A connection to the database could not be opened.', 3, '/var/log/php_errors.log'); //log into a file | |
?> |
This file contains 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
#!/bin/bash | |
dirty=`git status --porcelain -uno | sed s/^...//` | |
last_modified=`git show --pretty="format:" --name-only HEAD` | |
if [ -n "$dirty" ]; then | |
echo $dirty | |
else | |
echo $last_modified | |
fi |