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 href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
*/ | |
(function() { |
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 | |
/** | |
* A simple regex to test whether or not a facebook url is valid. For basic usage, this will do the job. | |
* @see Test cases <http://ideone.com/ZMJp4f> | |
*/ | |
$fbUrlCheck = '/^(https?:\/\/)?(www\.)?facebook.com\/[a-zA-Z0-9(\.\?)?]/'; | |
$secondCheck = '/home((\/)?\.[a-zA-Z0-9])?/'; | |
$validUrl = 'https://www.facebook.com/atomicpages/'; | |
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 | |
aptitude -y install expect | |
// Not required in actual script | |
MYSQL_ROOT_PASSWORD=abcd1234 | |
SECURE_MYSQL=$(expect -c " | |
set timeout 10 |
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
$.ajax({ | |
url: '/echo/error/', | |
async: true, | |
// retryCount and retryLimit will let you retry a determined number of times | |
retryCount: 0, | |
retryLimit: 10, | |
// retryTimeout limits the total time retrying (in milliseconds) | |
retryTimeout: 10000, | |
// timeout for each request | |
timeout: 1000, |
NewerOlder