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
<form action="process.php" method="post"> | |
<label>First Name</label> | |
<input name="first_name" type="text" /> | |
<label>Email</label> | |
<input name="email" type="text" /> | |
<input type="submit" value="Submit" /> | |
</form> | |
<script> |
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
https://github.com/lra/mackup | |
From Homebrew, on "master system" do: | |
# Install Mackup | |
brew install mackup | |
# Launch it and back up your files | |
mackup backup |
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 | |
###################################################################### | |
## MySQL Backup Script v2.1 - May 3, 2007 | |
###################################################################### | |
## For more documentation and new versions, please visit: | |
## http://www.dagondesign.com/articles/automatic-mysql-backup-script/ | |
## ------------------------------------------------------------------- | |
## Created by Dagon Design (www.dagondesign.com). | |
## Much credit goes to Oliver Mueller (oliver@teqneers.de) |
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
ab -n 10000 -c 10 http://fotan.us (Or any single page) | |
10000 is the number of hits | |
10 is the number of concurrent connections | |
If you just want to throw load at a single URL at a time on a web server then download Apache AB. It comes with Apache HTTP server. | |
Simple command (from Terminal on my Mac works) |
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
du -h --max-depth=1 /home/ | sort -h -r | |
du - Disk Usage command | |
print the total size of each folder under the /home/directory in human readable values (K, M, G) and sort -h -r | |
will sort them taking human readable values into account and will display the results in reverse order from largest fodler to smallest. | |
If u want largest folders last use only sort -h without -r |
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
ORDER BY FIELD(fieldname, 7, 4, 34); | |
or | |
ORDER BY FIELD(fieldname, 'seven', 'four', 'asshole'); |
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
.modal { | |
text-align: center; | |
} | |
@media screen and (min-width: 768px) { | |
.modal:before { | |
display: inline-block; | |
vertical-align: middle; | |
content: " "; | |
height: 100%; |
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
// Set $alert_type and $message somewhere else | |
<?php if(isset($message)) { ?> | |
<br /> | |
<div class="row"> | |
<?php | |
// Add ability to display different types of alerts. | |
// For backwards compatibility, if $alert-type isn't set, set it to alert-info. |
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
$url = “http://fotan.us”; | |
$handle = curl_init($url); | |
curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE); | |
/* Get the HTML or whatever is linked in $url. */ | |
$response = curl_exec($handle); | |
/* Check the return code. */ | |
$httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE); |
NewerOlder